[test] Check CVTOP constraints across Wasm versions and refresh expectations (#2358)
diff --git a/.github/workflows/ci-spectec.yml b/.github/workflows/ci-spectec.yml index b7ea336..590c02f 100644 --- a/.github/workflows/ci-spectec.yml +++ b/.github/workflows/ci-spectec.yml
@@ -3,11 +3,11 @@ on: push: branches: [ main ] - paths: [ spectec/**, document/** ] + paths: [ spectec/**, specification/**, document/** ] pull_request: branches: [ main ] - paths: [ spectec/**, document/** ] + paths: [ spectec/**, specification/**, document/** ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -33,3 +33,5 @@ run: pip install six && pip install sphinx==8.1.3 - name: Build and test run: cd spectec && opam exec make ci + - name: Check specification invariants + run: opam exec -- make -C specification/test test
diff --git a/specification/test/Makefile b/specification/test/Makefile new file mode 100644 index 0000000..f130524 --- /dev/null +++ b/specification/test/Makefile
@@ -0,0 +1,8 @@ +SPECTECDIR = ../../spectec + +.PHONY: test + +test: + rm -rf $(SPECTECDIR)/_specification + $(MAKE) -C $(SPECTECDIR) _specification + cd $(SPECTECDIR) && dune runtest _specification/test
diff --git a/specification/test/README.md b/specification/test/README.md new file mode 100644 index 0000000..96e6c90 --- /dev/null +++ b/specification/test/README.md
@@ -0,0 +1,27 @@ +# Specification sanity checks + +These tests check properties of the Wasm specifications. Tests of the SpecTec +implementation belong in `spectec/test-*` instead. + +With SpecTec's OCaml and Dune dependencies installed, run from the repository root: + +```sh +make -C specification/test test +``` + +The runner refreshes SpecTec's existing `_specification` copy and builds the tests +there, where SpecTec's private frontend and IL libraries are available. The test +sources and Dune rules are maintained here, not in `spectec/test-*`. The SpecTec +CI workflow also runs this target. + +The CVTOP check discovers every `wasm-*` specification directory, including +`wasm-latest`. For each version it checks all 192 combinations of four source +types, four destination types, and twelve operator forms against an independent +list of legal conversions. It elaborates the expressions and evaluates the +actual constructor premises from the specification's IL. + +Wasm 1.0 has 25 legal combinations; Wasm 2.0, 3.0, and latest have 33, including +the eight saturating conversions. Those operators are explicitly rejected for +1.0. Adding another version requires an explicit conversion oracle, so a new +directory cannot silently inherit the wrong expectations. An empty specification +directory is also an error.
diff --git a/specification/test/cvtop.ml b/specification/test/cvtop.ml new file mode 100644 index 0000000..fcdd7aa --- /dev/null +++ b/specification/test/cvtop.ml
@@ -0,0 +1,169 @@ +(* Exercise the SpecTec syntax constraints directly. WAST modules cannot express + arbitrary CVTOP combinations, and the interpreter backend delegates module + validation to the reference interpreter. See WebAssembly/spec#2302. *) + +open Util.Source + +(* Destination, source, operator: the 25 conversions in Wasm 1.0. Keep this + explicit so the oracle is independent of the specification's side conditions. *) +let core_conversions = [ + "I32", "I64", "WRAP"; + "I64", "I32", "EXTEND S"; + "I64", "I32", "EXTEND U"; + "I32", "F32", "TRUNC S"; + "I32", "F32", "TRUNC U"; + "I32", "F64", "TRUNC S"; + "I32", "F64", "TRUNC U"; + "I64", "F32", "TRUNC S"; + "I64", "F32", "TRUNC U"; + "I64", "F64", "TRUNC S"; + "I64", "F64", "TRUNC U"; + "F32", "I32", "CONVERT S"; + "F32", "I32", "CONVERT U"; + "F32", "I64", "CONVERT S"; + "F32", "I64", "CONVERT U"; + "F64", "I32", "CONVERT S"; + "F64", "I32", "CONVERT U"; + "F64", "I64", "CONVERT S"; + "F64", "I64", "CONVERT U"; + "F32", "F64", "DEMOTE"; + "F64", "F32", "PROMOTE"; + "I32", "F32", "REINTERPRET"; + "I64", "F64", "REINTERPRET"; + "F32", "I32", "REINTERPRET"; + "F64", "I64", "REINTERPRET"; +] + +(* Saturating conversions were added in Wasm 2.0. Test their absence in 1.0 + using the same operator matrix as for the later versions. *) +let saturating_conversions = [ + "I32", "F32", "TRUNC_SAT S"; + "I32", "F32", "TRUNC_SAT U"; + "I32", "F64", "TRUNC_SAT S"; + "I32", "F64", "TRUNC_SAT U"; + "I64", "F32", "TRUNC_SAT S"; + "I64", "F32", "TRUNC_SAT U"; + "I64", "F64", "TRUNC_SAT S"; + "I64", "F64", "TRUNC_SAT U"; +] + +let valid_conversions = function + | "1.0" -> core_conversions + | "2.0" | "3.0" | "latest" -> core_conversions @ saturating_conversions + | version -> failwith ("add a conversion oracle for Wasm " ^ version) + +let types = ["I32"; "I64"; "F32"; "F64"] +let operators = [ + "WRAP"; "EXTEND S"; "EXTEND U"; "TRUNC S"; "TRUNC U"; + "TRUNC_SAT S"; "TRUNC_SAT U"; + "CONVERT S"; "CONVERT U"; "DEMOTE"; "PROMOTE"; "REINTERPRET"; +] + +(* Elaboration resolves the type families. Evaluate the actual constructor + premises from the resulting IL as well: elaboration alone does not discharge + the width restrictions or the distinct-source-and-destination condition. *) +let rec syntax_holds env e = + match e.it with + | Il.Ast.SubE (e, _, _) -> syntax_holds env e + | Il.Ast.TupE es -> List.for_all (syntax_holds env) es + | Il.Ast.CaseE (operator, arguments, _) -> + let cases = + match Il.Eval.reduce_typdef env e.note with + | Ok {it = Il.Ast.VariantT cases; _} -> cases + | _ -> failwith "expected a ground variant type" + in + let _, (typ, _, premises), _ = + List.find (fun (op, _, _) -> Il.Eq.eq_mixop operator op) cases + in + let substitution = + match typ.it, arguments.it with + | Il.Ast.TupT fields, Il.Ast.TupE values -> + List.fold_left2 (fun subst (name, _) value -> + Il.Subst.add_varid subst name value + ) Il.Subst.empty fields values + | _ -> Il.Subst.empty + in + syntax_holds env arguments && + List.for_all (fun premise -> + match premise.it with + | Il.Ast.IfPr condition -> + let condition = Il.Subst.subst_exp substitution condition in + (match Il.Eval.reduce_exp env condition with + | Ok {it = Il.Ast.BoolE result; _} -> result + | _ -> failwith "expected a ground syntax condition" + ) + | _ -> failwith "expected a syntax side condition" + ) premises + | _ -> false + +let accepts frontend_env eval_env instruction = + let exp = Frontend.Parse.parse_exp instruction in + let typ = Frontend.Parse.parse_typ "instr" in + let elaborated = + try Some (Frontend.Elab.elab_exp frontend_env exp typ) + with Util.Error.Error _ -> None + in + match elaborated with + | Some exp' -> syntax_holds eval_env exp' + | None -> false + +let check_specification version directory = + let valid_conversions = valid_conversions version in + let script = + Sys.readdir directory + |> Array.to_list + |> List.filter (fun file -> Filename.check_suffix file ".spectec") + |> List.sort String.compare + |> List.concat_map (fun file -> + Frontend.Parse.parse_file (Filename.concat directory file)) + in + let il, frontend_env = Frontend.Elab.elab script in + Il.Valid.valid il; + let eval_env = Il.Env.env_of_script il in + let accepted = ref 0 in + let rejected = ref 0 in + let mismatches = ref [] in + List.iter (fun destination -> + List.iter (fun source -> + List.iter (fun operator -> + let instruction = + Printf.sprintf "CVTOP %s %s (%s)" destination source operator + in + let expected = List.mem (destination, source, operator) valid_conversions in + let actual = accepts frontend_env eval_env instruction in + if actual <> expected then + mismatches := (Printf.sprintf "%s: expected %s, got %s" instruction + (if expected then "accept" else "reject") + (if actual then "accept" else "reject")) :: !mismatches; + if actual then incr accepted else incr rejected + ) operators + ) types + ) types; + (match List.rev !mismatches with + | [] -> () + | first :: _ -> + failwith (Printf.sprintf "Wasm %s: %d unexpected CVTOP results (%d accepted, %d rejected): %s" + version (List.length !mismatches) !accepted !rejected first) + ); + assert (!accepted = List.length valid_conversions); + assert (!accepted + !rejected = 192); + Printf.printf "Wasm %s CVTOP: %d legal combinations accepted, %d illegal combinations rejected\n%!" + version !accepted !rejected + +let () = + if Array.length Sys.argv <> 2 then + failwith "usage: cvtop.exe <specification-directory>"; + let directory = Sys.argv.(1) in + let versions = + Sys.readdir directory + |> Array.to_list + |> List.filter (fun name -> String.starts_with ~prefix:"wasm-" name && + Sys.is_directory (Filename.concat directory name)) + |> List.sort String.compare + in + if versions = [] then + failwith "no wasm-* specification directories found"; + List.iter (fun name -> + let version = String.sub name 5 (String.length name - 5) in + check_specification version (Filename.concat directory name) + ) versions
diff --git a/specification/test/dune b/specification/test/dune new file mode 100644 index 0000000..636bdcd --- /dev/null +++ b/specification/test/dune
@@ -0,0 +1,8 @@ +(test + (name cvtop) + (libraries util frontend il) + (deps (source_tree ..)) + (action + (chdir %{workspace_root}/_specification + (run %{test} .))) +)
diff --git a/spectec/dune b/spectec/dune new file mode 100644 index 0000000..6406a7c --- /dev/null +++ b/spectec/dune
@@ -0,0 +1 @@ +(dirs :standard _specification)
diff --git a/spectec/test-frontend/TEST.md b/spectec/test-frontend/TEST.md index 854415f..0fe3090 100644 --- a/spectec/test-frontend/TEST.md +++ b/spectec/test-frontend/TEST.md
@@ -1608,7 +1608,7 @@ ;; ../../../../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([], []) = ([], []) @@ -2016,17 +2016,13 @@ ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec syntax lane_(lanetype : lanetype) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec - syntax lane_{numtype : numtype}((numtype : numtype <: lanetype)) = num_(numtype) - - - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec - syntax lane_{packtype : packtype}((packtype : packtype <: lanetype)) = pack_(packtype) - - - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec syntax lane_{Jnn : Jnn}((Jnn : Jnn <: lanetype)) = iN($lsizenn((Jnn : Jnn <: lanetype))) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec + syntax lane_{Fnn : Fnn}((Fnn : Fnn <: lanetype)) = fN($sizenn((Fnn : Fnn <: numtype))) + + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec syntax vec_{Vnn : Vnn}(Vnn) = vN($vsizenn(Vnn)) @@ -2376,11 +2372,11 @@ ;; ../../../../specification/wasm-latest/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)) = + syntax vcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: 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)))) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Inn_2 : Inn <: lanetype))) /\ ($lsizenn2((Inn_2 : Inn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Inn_2 : Inn <: 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)))) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Inn_2 : Inn <: lanetype))) /\ ($lsizenn2((Inn_2 : Inn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Inn_2 : Inn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec @@ -2411,7 +2407,7 @@ ;; ../../../../specification/wasm-latest/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))) + -- if ((((sz!`%`_sz.0 * M!`%`_M.0) : nat <:> rat) = (($vsize(vectype) : nat <:> rat) / (2 : nat <:> rat))) /\ (M!`%`_M.0 > 1)) | SPLAT(sz) | ZERO(sz : sz,) -- if (sz!`%`_sz.0 >= 32) @@ -2695,233 +2691,233 @@ ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec rec { -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:585.1-585.44 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:591.1-591.44 def $shift_labelidxs(labelidx*) : labelidx* - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:586.1-586.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:592.1-592.32 def $shift_labelidxs([]) = [] - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:587.1-587.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:593.1-593.66 def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0,)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:588.1-588.91 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:594.1-594.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-latest/1.3-syntax.instructions.spectec rec { -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:421.1-421.30 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:427.1-427.30 def $free_instr(instr : instr) : free - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:436.1-436.26 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:442.1-442.26 def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:437.1-437.34 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:443.1-443.34 def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:438.1-438.27 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:444.1-444.27 def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:439.1-439.86 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:445.1-445.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-latest/1.3-syntax.instructions.spectec:441.1-441.92 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:447.1-447.92 def $free_instr{blocktype : blocktype, `instr*` : instr*}(BLOCK_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:442.1-442.91 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:448.1-448.91 def $free_instr{blocktype : blocktype, `instr*` : instr*}(LOOP_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:443.1-444.79 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:449.1-450.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-latest/1.3-syntax.instructions.spectec:446.1-446.56 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:452.1-452.56 def $free_instr{labelidx : labelidx}(BR_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:447.1-447.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:453.1-453.59 def $free_instr{labelidx : labelidx}(BR_IF_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:448.1-449.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:454.1-455.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-latest/1.3-syntax.instructions.spectec:450.1-450.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:456.1-456.64 def $free_instr{labelidx : labelidx}(BR_ON_NULL_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:451.1-451.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:457.1-457.68 def $free_instr{labelidx : labelidx}(BR_ON_NON_NULL_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:452.1-453.83 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:458.1-459.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-latest/1.3-syntax.instructions.spectec:454.1-455.83 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:460.1-461.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-latest/1.3-syntax.instructions.spectec:457.1-457.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:463.1-463.55 def $free_instr{funcidx : funcidx}(CALL_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:458.1-458.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:464.1-464.59 def $free_instr{typeuse : typeuse}(CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:459.1-460.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:465.1-466.53 def $free_instr{tableidx : tableidx, typeuse : typeuse}(CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:461.1-461.29 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:467.1-467.29 def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:462.1-462.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:468.1-468.62 def $free_instr{funcidx : funcidx}(RETURN_CALL_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:463.1-463.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:469.1-469.66 def $free_instr{typeuse : typeuse}(RETURN_CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:464.1-465.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:470.1-471.53 def $free_instr{tableidx : tableidx, typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:467.1-467.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:473.1-473.53 def $free_instr{tagidx : tagidx}(THROW_instr(tagidx)) = $free_tagidx(tagidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:468.1-468.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:474.1-474.32 def $free_instr(THROW_REF_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:469.1-470.87 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:475.1-476.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-latest/1.3-syntax.instructions.spectec:472.1-472.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:478.1-478.63 def $free_instr{numtype : numtype, numlit : num_(numtype)}(CONST_instr(numtype, numlit)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:473.1-473.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:479.1-479.60 def $free_instr{numtype : numtype, unop : unop_(numtype)}(UNOP_instr(numtype, unop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:474.1-474.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:480.1-480.62 def $free_instr{numtype : numtype, binop : binop_(numtype)}(BINOP_instr(numtype, binop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/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-latest/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-latest/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-latest/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-latest/1.3-syntax.instructions.spectec:481.1-481.64 + def $free_instr{numtype : numtype, testop : testop_(numtype)}(TESTOP_instr(numtype, testop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:482.1-482.62 + def $free_instr{numtype : numtype, relop : relop_(numtype)}(RELOP_instr(numtype, relop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:483.1-484.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-latest/1.3-syntax.instructions.spectec:486.1-486.64 + def $free_instr{vectype : vectype, veclit : vec_(vectype)}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:487.1-487.64 def $free_instr{vectype : vectype, vvunop : vvunop}(VVUNOP_instr(vectype, vvunop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:482.1-482.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:488.1-488.66 def $free_instr{vectype : vectype, vvbinop : vvbinop}(VVBINOP_instr(vectype, vvbinop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:483.1-483.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:489.1-489.68 def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:484.1-484.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:490.1-490.68 def $free_instr{vectype : vectype, vvtestop : vvtestop}(VVTESTOP_instr(vectype, vvtestop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:485.1-485.56 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:491.1-491.56 def $free_instr{shape : shape, vunop : vunop_(shape)}(VUNOP_instr(shape, vunop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:486.1-486.58 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:492.1-492.58 def $free_instr{shape : shape, vbinop : vbinop_(shape)}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:487.1-487.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:493.1-493.60 def $free_instr{shape : shape, vternop : vternop_(shape)}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:488.1-488.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:494.1-494.60 def $free_instr{shape : shape, vtestop : vtestop_(shape)}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:489.1-489.58 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:495.1-495.58 def $free_instr{shape : shape, vrelop : vrelop_(shape)}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:490.1-490.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:496.1-496.64 def $free_instr{ishape : ishape, vshiftop : vshiftop_(ishape)}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape(ishape!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:491.1-491.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:497.1-497.55 def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape(ishape!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:492.1-492.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:498.1-498.66 def $free_instr{bshape : bshape, vswizzlop : vswizzlop_(bshape)}(VSWIZZLOP_instr(bshape, vswizzlop)) = $free_shape(bshape!`%`_bshape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:493.1-493.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:499.1-499.64 def $free_instr{bshape : bshape, `laneidx*` : laneidx*}(VSHUFFLE_instr(bshape, laneidx*{laneidx <- `laneidx*`})) = $free_shape(bshape!`%`_bshape.0) - ;; ../../../../specification/wasm-latest/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-latest/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-latest/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-latest/1.3-syntax.instructions.spectec:500.1-501.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-latest/1.3-syntax.instructions.spectec:502.1-503.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-latest/1.3-syntax.instructions.spectec:504.1-505.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-latest/1.3-syntax.instructions.spectec:506.1-507.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-latest/1.3-syntax.instructions.spectec:502.1-503.47 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:508.1-509.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-latest/1.3-syntax.instructions.spectec:504.1-504.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:510.1-510.51 def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:505.1-505.70 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:511.1-511.70 def $free_instr{shape : shape, `sx?` : sx?, laneidx : laneidx}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:506.1-506.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:512.1-512.66 def $free_instr{shape : shape, laneidx : laneidx}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:508.1-508.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:514.1-514.62 def $free_instr{heaptype : heaptype}(`REF.NULL`_instr(heaptype)) = $free_heaptype(heaptype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:509.1-509.34 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:515.1-515.34 def $free_instr(`REF.IS_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:510.1-510.38 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:516.1-516.38 def $free_instr(`REF.AS_NON_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:511.1-511.29 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:517.1-517.29 def $free_instr(`REF.EQ`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:512.1-512.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:518.1-518.59 def $free_instr{reftype : reftype}(`REF.TEST`_instr(reftype)) = $free_reftype(reftype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:513.1-513.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:519.1-519.59 def $free_instr{reftype : reftype}(`REF.CAST`_instr(reftype)) = $free_reftype(reftype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:514.1-514.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:520.1-520.59 def $free_instr{funcidx : funcidx}(`REF.FUNC`_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:515.1-515.30 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:521.1-521.30 def $free_instr(`REF.I31`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:517.1-517.33 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:523.1-523.33 def $free_instr{sx : sx}(`I31.GET`_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:519.1-519.61 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:525.1-525.61 def $free_instr{typeidx : typeidx}(`STRUCT.NEW`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:520.1-520.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:526.1-526.69 def $free_instr{typeidx : typeidx}(`STRUCT.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:521.1-521.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:527.1-527.69 def $free_instr{`sx?` : sx?, typeidx : typeidx, u32 : u32}(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:522.1-522.65 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:528.1-528.65 def $free_instr{typeidx : typeidx, u32 : u32}(`STRUCT.SET`_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:524.1-524.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:530.1-530.60 def $free_instr{typeidx : typeidx}(`ARRAY.NEW`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:525.1-525.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:531.1-531.68 def $free_instr{typeidx : typeidx}(`ARRAY.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:526.1-526.70 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:532.1-532.70 def $free_instr{typeidx : typeidx, u32 : u32}(`ARRAY.NEW_FIXED`_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:527.1-528.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:533.1-534.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(`ARRAY.NEW_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:529.1-530.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:535.1-536.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:531.1-531.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:537.1-537.64 def $free_instr{`sx?` : sx?, typeidx : typeidx}(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:532.1-532.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:538.1-538.60 def $free_instr{typeidx : typeidx}(`ARRAY.SET`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:533.1-533.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:539.1-539.32 def $free_instr(`ARRAY.LEN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:534.1-534.61 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:540.1-540.61 def $free_instr{typeidx : typeidx}(`ARRAY.FILL`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:535.1-536.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:541.1-542.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-latest/1.3-syntax.instructions.spectec:537.1-538.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:543.1-544.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(`ARRAY.INIT_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:539.1-540.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:545.1-546.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:542.1-542.41 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:548.1-548.41 def $free_instr(`EXTERN.CONVERT_ANY`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:543.1-543.41 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:549.1-549.41 def $free_instr(`ANY.CONVERT_EXTERN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:545.1-545.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:551.1-551.63 def $free_instr{localidx : localidx}(`LOCAL.GET`_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:546.1-546.63 - def $free_instr{localidx : localidx}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:547.1-547.63 - def $free_instr{localidx : localidx}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:549.1-549.67 - def $free_instr{globalidx : globalidx}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:550.1-550.67 - def $free_instr{globalidx : globalidx}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:552.1-552.63 - def $free_instr{tableidx : tableidx}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + def $free_instr{localidx : localidx}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:553.1-553.63 + def $free_instr{localidx : localidx}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:555.1-555.67 + def $free_instr{globalidx : globalidx}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:556.1-556.67 + def $free_instr{globalidx : globalidx}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:558.1-558.63 + def $free_instr{tableidx : tableidx}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:559.1-559.63 def $free_instr{tableidx : tableidx}(`TABLE.SET`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:554.1-554.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:560.1-560.64 def $free_instr{tableidx : tableidx}(`TABLE.SIZE`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:555.1-555.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:561.1-561.64 def $free_instr{tableidx : tableidx}(`TABLE.GROW`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:556.1-556.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:562.1-562.64 def $free_instr{tableidx : tableidx}(`TABLE.FILL`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:557.1-558.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:563.1-564.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-latest/1.3-syntax.instructions.spectec:559.1-560.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:565.1-566.53 def $free_instr{tableidx : tableidx, elemidx : elemidx}(`TABLE.INIT`_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:561.1-561.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:567.1-567.60 def $free_instr{elemidx : elemidx}(`ELEM.DROP`_instr(elemidx)) = $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/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-latest/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-latest/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-latest/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) + 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-latest/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) + 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-latest/1.3-syntax.instructions.spectec:573.1-574.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-latest/1.3-syntax.instructions.spectec:575.1-576.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-latest/1.3-syntax.instructions.spectec:577.1-578.49 + def $free_instr{vectype : vectype, memidx : memidx, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:579.1-580.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-latest/1.3-syntax.instructions.spectec:575.1-575.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:581.1-581.59 def $free_instr{memidx : memidx}(`MEMORY.SIZE`_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:576.1-576.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:582.1-582.59 def $free_instr{memidx : memidx}(`MEMORY.GROW`_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:577.1-577.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:583.1-583.59 def $free_instr{memidx : memidx}(`MEMORY.FILL`_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:578.1-579.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:584.1-585.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-latest/1.3-syntax.instructions.spectec:580.1-581.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:586.1-587.49 def $free_instr{memidx : memidx, dataidx : dataidx}(`MEMORY.INIT`_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:582.1-582.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:588.1-588.60 def $free_instr{dataidx : dataidx}(`DATA.DROP`_instr(dataidx)) = $free_dataidx(dataidx) -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:422.1-422.31 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:428.1-428.31 def $free_block(instr*) : free - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:590.1-591.47 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:596.1-597.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*`})) } @@ -5299,7 +5295,9 @@ ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec def $lpacknum_(lanetype : lanetype, num_ : num_($lunpack(lanetype))) : lane_(lanetype) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $lpacknum_{numtype : numtype, c : num_($lunpack((numtype : numtype <: lanetype)))}((numtype : numtype <: lanetype), c) = c + def $lpacknum_{Inn : Inn, c : num_($lunpack((Inn : Inn <: lanetype)))}((Inn : Inn <: lanetype), c) = c + ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec + def $lpacknum_{Fnn : Fnn, c : num_($lunpack((Fnn : Fnn <: lanetype)))}((Fnn : Fnn <: lanetype), c) = c ;; ../../../../specification/wasm-latest/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) @@ -5313,7 +5311,9 @@ ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec def $lunpacknum_(lanetype : lanetype, lane_ : lane_(lanetype)) : num_($lunpack(lanetype)) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $lunpacknum_{numtype : numtype, c : lane_((numtype : numtype <: lanetype))}((numtype : numtype <: lanetype), c) = c + def $lunpacknum_{Inn : Inn, c : lane_((Inn : Inn <: lanetype))}((Inn : Inn <: lanetype), c) = c + ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec + def $lunpacknum_{Fnn : Fnn, c : lane_((Fnn : Fnn <: lanetype))}((Fnn : Fnn <: lanetype), c) = c ;; ../../../../specification/wasm-latest/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) @@ -5458,9 +5458,9 @@ ;; ../../../../specification/wasm-latest/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-latest/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?`} + def $zeroop{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: lanetype), M_2), TRUNC_SAT_vcvtop__(sx, zero?{zero <- `zero?`})) = zero?{zero <- `zero?`} ;; ../../../../specification/wasm-latest/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?`} + def $zeroop{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: lanetype), M_2), RELAXED_TRUNC_vcvtop__(sx, zero?{zero <- `zero?`})) = zero?{zero <- `zero?`} ;; ../../../../specification/wasm-latest/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-latest/3.2-numerics.vector.spectec @@ -5473,9 +5473,9 @@ ;; ../../../../specification/wasm-latest/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-latest/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?`})) = ?() + def $halfop{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: lanetype), M_2), TRUNC_SAT_vcvtop__(sx, zero?{zero <- `zero?`})) = ?() ;; ../../../../specification/wasm-latest/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?`})) = ?() + def $halfop{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: lanetype), M_2), RELAXED_TRUNC_vcvtop__(sx, zero?{zero <- `zero?`})) = ?() ;; ../../../../specification/wasm-latest/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-latest/3.2-numerics.vector.spectec @@ -6827,7 +6827,7 @@ ;; ../../../../specification/wasm-latest/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]) + -- if (c_2 = $lunpacknum_((nt : numtype <: lanetype), $lanes_(`%X%`_shape((nt : numtype <: lanetype), M), c_1)[i!`%`_laneidx.0])) ;; ../../../../specification/wasm-latest/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)}: @@ -7159,7 +7159,7 @@ ;; ../../../../specification/wasm-latest/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)]) + `%~>%`(`%;%`_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_($iadd_($size((at : addrtype <: numtype)), `%`_iN(i!`%`_num_.0,), `%`_iN(1,))!`%`_iN.0,)) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `MEMORY.FILL`_instr(x)]) -- otherwise ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec @@ -7175,7 +7175,7 @@ ;; ../../../../specification/wasm-latest/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)]) + `%~>%`(`%;%`_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_($iadd_($size((at_1 : addrtype <: numtype)), `%`_iN(i_1!`%`_num_.0,), `%`_iN(1,))!`%`_iN.0,)) CONST_instr((at_2 : addrtype <: numtype), `%`_num_($iadd_($size((at_2 : addrtype <: numtype)), `%`_iN(i_2!`%`_num_.0,), `%`_iN(1,))!`%`_iN.0,)) 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) @@ -7197,7 +7197,7 @@ ;; ../../../../specification/wasm-latest/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)]) + `%~>%`(`%;%`_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_($iadd_($size((at : addrtype <: numtype)), `%`_iN(i!`%`_num_.0,), `%`_iN(1,))!`%`_iN.0,)) CONST_instr(I32_numtype, $iadd_(32, j, `%`_iN(1,))) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `MEMORY.INIT`_instr(x, y)]) -- otherwise ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec @@ -8188,6 +8188,7 @@ ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec rule _{s : store, `b*` : byte*}: `%|-%:%`(s, {BYTES b*{b <- `b*`}}, OK_datatype) + -- if (|b*{b <- `b*`}| < (2 ^ 32)) ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec relation Eleminst_ok: `%|-%:%`(store, eleminst, elemtype) @@ -8196,6 +8197,7 @@ `%|-%:%`(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*`} + -- if (|ref*{ref <- `ref*`}| < (2 ^ 32)) ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec relation Exportinst_ok: `%|-%:OK`(store, exportinst) @@ -8266,51 +8268,50 @@ -- 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-latest/7.1-soundness.configurations.spectec:37.1-42.35 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:37.1-41.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*`},)) + -- Expr_ok2: `%;%|-%:%`(s, C' +++ {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(`%`_resulttype(t^n{t <- `t*`},)), REFS [], RECS []}, 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-latest/7.1-soundness.configurations.spectec:44.1-47.49 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:43.1-46.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-latest/7.1-soundness.configurations.spectec:49.1-51.42 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:48.1-50.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-latest/7.1-soundness.configurations.spectec:5.1-6.36 relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:54.1-55.27 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:53.1-54.27 rule empty{s : store, C : context}: `%;%|-%:%`(s, C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:57.1-59.50 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:56.1-58.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-latest/7.1-soundness.configurations.spectec:61.1-65.86 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:60.1-64.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-latest/7.1-soundness.configurations.spectec:67.1-71.33 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:66.1-70.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-latest/7.1-soundness.configurations.spectec:74.1-77.33 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:73.1-76.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*`},))) @@ -8318,7 +8319,7 @@ ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:7.1-8.36 relation Expr_ok2: `%;%|-%:%`(store, context, expr, resulttype) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:80.1-82.44 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:79.1-81.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*`},))) @@ -8394,30 +8395,30 @@ ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec rec { -;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:230.1-231.50 +;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:231.1-232.50 relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:244.1-247.35 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:245.1-248.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-latest/7.1-soundness.configurations.spectec:249.1-252.20 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:250.1-253.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-latest/7.1-soundness.configurations.spectec:254.1-256.42 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:255.1-257.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-latest/7.1-soundness.configurations.spectec:258.1-259.44 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:259.1-260.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-latest/7.1-soundness.configurations.spectec:261.1-262.28 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:262.1-263.28 rule `ref.extern`{ref : ref, s : store}: `%>>_%%`(`REF.EXTERN`_fieldval(ref), s, (ref : ref <: fieldval)) }
diff --git a/spectec/test-interpreter/TEST.md b/spectec/test-interpreter/TEST.md index 1540225..3b66578 100644 --- a/spectec/test-interpreter/TEST.md +++ b/spectec/test-interpreter/TEST.md
@@ -51,8 +51,6 @@ == Translating to AL... == Initializing interpreter... == Interpreting... -- Failed to parse ../test-interpreter/spec-test-1/conversions.wast - - Failed to parse ../test-interpreter/spec-test-1/data.wast - Failed to parse ../test-interpreter/spec-test-1/elem.wast @@ -73,7 +71,7 @@ - print_i32: 1 - print_i32: 2 - print: () -8 parsing fail +7 parsing fail == Complete. Running test for Wasm 2.0... spectec 0.5 generator
diff --git a/spectec/test-interpreter/spec-test-1/conversions.wast b/spectec/test-interpreter/spec-test-1/conversions.wast index c0ae54a..308296d 100644 --- a/spectec/test-interpreter/spec-test-1/conversions.wast +++ b/spectec/test-interpreter/spec-test-1/conversions.wast
@@ -354,10 +354,10 @@ (assert_return (invoke "f64.promote_f32" (f32.const 0x1.8f867ep+125)) (f64.const 6.6382536710104395e+37)) (assert_return (invoke "f64.promote_f32" (f32.const inf)) (f64.const inf)) (assert_return (invoke "f64.promote_f32" (f32.const -inf)) (f64.const -inf)) -(assert_return_canonical_nan (invoke "f64.promote_f32" (f32.const nan))) -(assert_return_arithmetic_nan (invoke "f64.promote_f32" (f32.const nan:0x200000))) -(assert_return_canonical_nan (invoke "f64.promote_f32" (f32.const -nan))) -(assert_return_arithmetic_nan (invoke "f64.promote_f32" (f32.const -nan:0x200000))) +(assert_return (invoke "f64.promote_f32" (f32.const nan)) (f64.const nan:canonical)) +(assert_return (invoke "f64.promote_f32" (f32.const nan:0x200000)) (f64.const nan:arithmetic)) +(assert_return (invoke "f64.promote_f32" (f32.const -nan)) (f64.const nan:canonical)) +(assert_return (invoke "f64.promote_f32" (f32.const -nan:0x200000)) (f64.const nan:arithmetic)) (assert_return (invoke "f32.demote_f64" (f64.const 0.0)) (f32.const 0.0)) (assert_return (invoke "f32.demote_f64" (f64.const -0.0)) (f32.const -0.0)) @@ -401,10 +401,10 @@ (assert_return (invoke "f32.demote_f64" (f64.const 0x1.cb98354d521ffp-127)) (f32.const 0x1.cb9834p-127)) (assert_return (invoke "f32.demote_f64" (f64.const -0x1.6972b30cfb562p+1)) (f32.const -0x1.6972b4p+1)) (assert_return (invoke "f32.demote_f64" (f64.const -0x1.bedbe4819d4c4p+112)) (f32.const -0x1.bedbe4p+112)) -(assert_return_canonical_nan (invoke "f32.demote_f64" (f64.const nan))) -(assert_return_arithmetic_nan (invoke "f32.demote_f64" (f64.const nan:0x4000000000000))) -(assert_return_canonical_nan (invoke "f32.demote_f64" (f64.const -nan))) -(assert_return_arithmetic_nan (invoke "f32.demote_f64" (f64.const -nan:0x4000000000000))) +(assert_return (invoke "f32.demote_f64" (f64.const nan)) (f32.const nan:canonical)) +(assert_return (invoke "f32.demote_f64" (f64.const nan:0x4000000000000)) (f32.const nan:arithmetic)) +(assert_return (invoke "f32.demote_f64" (f64.const -nan)) (f32.const nan:canonical)) +(assert_return (invoke "f32.demote_f64" (f64.const -nan:0x4000000000000)) (f32.const nan:arithmetic)) (assert_return (invoke "f32.demote_f64" (f64.const 0x1p-1022)) (f32.const 0.0)) (assert_return (invoke "f32.demote_f64" (f64.const -0x1p-1022)) (f32.const -0.0)) (assert_return (invoke "f32.demote_f64" (f64.const 0x1.0p-150)) (f32.const 0.0))
diff --git a/spectec/test-latex/TEST.md b/spectec/test-latex/TEST.md index 2ec89f5..570fb0d 100644 --- a/spectec/test-latex/TEST.md +++ b/spectec/test-latex/TEST.md
@@ -3741,11 +3741,12 @@ \end{array} $$ +\vspace{1ex} + $$ \begin{array}[t]{@{}lrrl@{}l@{}} -& {{\mathit{lane}}}_{{\mathit{numtype}}} & ::= & {{\mathit{num}}}_{{\mathit{numtype}}} \\ -& {{\mathit{lane}}}_{{\mathit{packtype}}} & ::= & {{\mathit{pack}}}_{{\mathit{packtype}}} \\ & {{\mathit{lane}}}_{{\mathsf{i}}{N}} & ::= & {i}{N} \\ +& {{\mathit{lane}}}_{{\mathsf{f}}{N}} & ::= & {f}{N} \\ & {{\mathit{vec}}}_{{\mathsf{v}}{N}} & ::= & {v}{N} \\ \end{array} $$ @@ -3972,7 +3973,7 @@ $$ \begin{array}[t]{@{}lrrl@{}l@{}} & {{\mathit{storeop}}}_{{\mathsf{i}}{N}} & ::= & {\mathit{sz}} & \quad \mbox{if}~ {\mathit{sz}} < N \\ -& {{\mathit{vloadop}}}_{{\mathit{vectype}}} & ::= & {{\mathit{sz}}}{\mathsf{x}}{M}{\mathsf{\_}}{{\mathit{sx}}} & \quad \mbox{if}~ {\mathit{sz}} \cdot M = {|{\mathit{vectype}}|} / 2 \\ +& {{\mathit{vloadop}}}_{{\mathit{vectype}}} & ::= & {{\mathit{sz}}}{\mathsf{x}}{M}{\mathsf{\_}}{{\mathit{sx}}} & \quad \mbox{if}~ {\mathit{sz}} \cdot M = {|{\mathit{vectype}}|} / 2 \land M > \mathsf{{\scriptstyle 1}} \\ & & | & {{\mathit{sz}}}{\mathsf{\_}}{\mathsf{splat}} \\ & & | & {{\mathit{sz}}}{\mathsf{\_}}{\mathsf{zero}} & \quad \mbox{if}~ {\mathit{sz}} \geq \mathsf{{\scriptstyle 32}} \\ \end{array} @@ -8363,7 +8364,8 @@ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{{\mathrm{pack}}}_{{\mathit{numtype}}}(c) & = & c \\ +{{\mathrm{pack}}}_{{\mathsf{i}}{N}}(c) & = & c \\ +{{\mathrm{pack}}}_{{\mathsf{f}}{N}}(c) & = & c \\ {{\mathrm{pack}}}_{{\mathit{packtype}}}(c) & = & {{\mathrm{wrap}}}_{{|{\mathrm{unpack}}({\mathit{packtype}})|}, {|{\mathit{packtype}}|}}(c) \\ \end{array} $$ @@ -8379,7 +8381,8 @@ $$ \begin{array}[t]{@{}lcl@{}l@{}} -{{\mathrm{unpack}}}_{{\mathit{numtype}}}(c) & = & c \\ +{{\mathrm{unpack}}}_{{\mathsf{i}}{N}}(c) & = & c \\ +{{\mathrm{unpack}}}_{{\mathsf{f}}{N}}(c) & = & c \\ {{\mathrm{unpack}}}_{{\mathit{packtype}}}(c) & = & {{{{\mathrm{extend}}}_{{|{\mathit{packtype}}|}, {|{\mathrm{unpack}}({\mathit{packtype}})|}}^{\mathsf{u}}}}{(c)} \\ \end{array} $$ @@ -10473,7 +10476,7 @@ & \multicolumn{4}{@{}l@{}}{\quad \begin{array}[t]{@{}l@{}l@{}} \begin{array}[t]{@{}l@{}} ({\mathit{at}}{.}\mathsf{const}~i)~{\mathit{val}}~({\mathsf{i{\scriptstyle 32}}{.}\mathsf{store}}{\mathsf{{\scriptstyle 8}}}~x) \\ - ({\mathit{at}}{.}\mathsf{const}~i + 1)~{\mathit{val}}~({\mathit{at}}{.}\mathsf{const}~n - 1)~(\mathsf{memory{.}fill}~x) \end{array} & \quad \mbox{otherwise} \\ + ({\mathit{at}}{.}\mathsf{const}~{{\mathrm{iadd}}}_{{|{\mathit{at}}|}}(i, 1))~{\mathit{val}}~({\mathit{at}}{.}\mathsf{const}~n - 1)~(\mathsf{memory{.}fill}~x) \end{array} & \quad \mbox{otherwise} \\ \end{array} } \\ \end{array} @@ -10492,7 +10495,7 @@ & \multicolumn{4}{@{}l@{}}{\quad \begin{array}[t]{@{}l@{}l@{}} \begin{array}[t]{@{}l@{}} ({\mathit{at}}_1{.}\mathsf{const}~i_1)~({\mathit{at}}_2{.}\mathsf{const}~i_2)~({\mathsf{i{\scriptstyle 32}}{.}\mathsf{load}}{{\mathsf{{\scriptstyle 8}}}{\mathsf{\_}}{\mathsf{u}}}~x_2)~({\mathsf{i{\scriptstyle 32}}{.}\mathsf{store}}{\mathsf{{\scriptstyle 8}}}~x_1) \\ - ({\mathit{at}}_1{.}\mathsf{const}~i_1 + 1)~({\mathit{at}}_2{.}\mathsf{const}~i_2 + 1)~({\mathit{at}'}{.}\mathsf{const}~n - 1)~(\mathsf{memory{.}copy}~x_1~x_2) \end{array} & \quad \mbox{otherwise, if}~ i_1 \leq i_2 \\ + ({\mathit{at}}_1{.}\mathsf{const}~{{\mathrm{iadd}}}_{{|{\mathit{at}}_1|}}(i_1, 1))~({\mathit{at}}_2{.}\mathsf{const}~{{\mathrm{iadd}}}_{{|{\mathit{at}}_2|}}(i_2, 1))~({\mathit{at}'}{.}\mathsf{const}~n - 1)~(\mathsf{memory{.}copy}~x_1~x_2) \end{array} & \quad \mbox{otherwise, if}~ i_1 \leq i_2 \\ \end{array} } \\ {[\textsc{\scriptsize E{-}memory.copy{-}gt}]} \quad & z ; ({\mathit{at}}_1{.}\mathsf{const}~i_1)~({\mathit{at}}_2{.}\mathsf{const}~i_2)~({\mathit{at}'}{.}\mathsf{const}~n)~(\mathsf{memory{.}copy}~x_1~x_2) & \hookrightarrow & & \\ @@ -10518,7 +10521,7 @@ & \multicolumn{4}{@{}l@{}}{\quad \begin{array}[t]{@{}l@{}l@{}} \begin{array}[t]{@{}l@{}} ({\mathit{at}}{.}\mathsf{const}~i)~(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~z{.}\mathsf{datas}{}[y]{.}\mathsf{bytes}{}[j])~({\mathsf{i{\scriptstyle 32}}{.}\mathsf{store}}{\mathsf{{\scriptstyle 8}}}~x) \\ - ({\mathit{at}}{.}\mathsf{const}~i + 1)~(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~j + 1)~(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~n - 1)~(\mathsf{memory{.}init}~x~y) \end{array} & \quad \mbox{otherwise} \\ + ({\mathit{at}}{.}\mathsf{const}~{{\mathrm{iadd}}}_{{|{\mathit{at}}|}}(i, 1))~(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~{{\mathrm{iadd}}}_{32}(j, 1))~(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~n - 1)~(\mathsf{memory{.}init}~x~y) \end{array} & \quad \mbox{otherwise} \\ \end{array} } \\ \end{array} @@ -11068,7 +11071,7 @@ $$ \begin{array}[t]{@{}lrcl@{}l@{}} -{[\textsc{\scriptsize E{-}vextract\_lane{-}num}]} \quad & (\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c_1)~({{\mathit{nt}}}{\mathsf{x}}{M}{.}\mathsf{extract\_lane}~i) & \hookrightarrow & ({\mathit{nt}}{.}\mathsf{const}~c_2) & \quad \mbox{if}~ c_2 = {{\mathrm{lanes}}}_{{{\mathit{nt}}}{\mathsf{x}}{M}}(c_1){}[i] \\ +{[\textsc{\scriptsize E{-}vextract\_lane{-}num}]} \quad & (\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c_1)~({{\mathit{nt}}}{\mathsf{x}}{M}{.}\mathsf{extract\_lane}~i) & \hookrightarrow & ({\mathit{nt}}{.}\mathsf{const}~c_2) & \quad \mbox{if}~ c_2 = {{\mathrm{unpack}}}_{{\mathit{nt}}}({{\mathrm{lanes}}}_{{{\mathit{nt}}}{\mathsf{x}}{M}}(c_1){}[i]) \\ {[\textsc{\scriptsize E{-}vextract\_lane{-}pack}]} \quad & (\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c_1)~({{{\mathit{pt}}}{\mathsf{x}}{M}{.}\mathsf{extract\_lane}}{\mathsf{\_}}{{\mathit{sx}}}~i) & \hookrightarrow & (\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~c_2) & \quad \mbox{if}~ c_2 = {{{{\mathrm{extend}}}_{{|{\mathit{pt}}|}, 32}^{{\mathit{sx}}}}}{({{\mathrm{lanes}}}_{{{\mathit{pt}}}{\mathsf{x}}{M}}(c_1){}[i])} \\ \end{array} $$ @@ -14317,9 +14320,7 @@ \frac{ s \vdash f : {C'} \qquad -{C'}{.}\mathsf{return} = {t^{n}} - \qquad -s ; {C'} \vdash {{\mathit{instr}}^\ast} : {t^{n}} +s ; {C'} \oplus \{ \mathsf{return}~{t^{n}} \} \vdash {{\mathit{instr}}^\ast} : {t^{n}} \qquad \{ \} \vdash {t^{n}} : \mathsf{ok} }{ @@ -14530,6 +14531,7 @@ $$ \begin{array}{@{}c@{}}\displaystyle \frac{ +{|{b^\ast}|} < {2^{32}} }{ s \vdash \{ \mathsf{bytes}~{b^\ast} \} : \mathsf{ok} } \, {[\textsc{\scriptsize Datainst\_ok}]} @@ -14543,6 +14545,8 @@ \{ \} \vdash {\mathit{rt}} : \mathsf{ok} \qquad (s \vdash {\mathit{ref}} : {\mathit{rt}})^\ast + \qquad +{|{{\mathit{ref}}^\ast}|} < {2^{32}} }{ s \vdash \{ \mathsf{type}~{\mathit{rt}},\;\allowbreak \mathsf{refs}~{{\mathit{ref}}^\ast} \} : {\mathit{rt}} } \, {[\textsc{\scriptsize Eleminst\_ok}]}
diff --git a/spectec/test-middlend/TEST.md b/spectec/test-middlend/TEST.md index 1e1588a..ab2acbf 100644 --- a/spectec/test-middlend/TEST.md +++ b/spectec/test-middlend/TEST.md
@@ -1131,7 +1131,7 @@ ;; ../../../../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([], []) = ([], []) @@ -1539,17 +1539,13 @@ ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec syntax lane_(lanetype : lanetype) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec - syntax lane_{numtype : numtype}((numtype : numtype <: lanetype)) = num_(numtype) - - - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec - syntax lane_{packtype : packtype}((packtype : packtype <: lanetype)) = pack_(packtype) - - - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec syntax lane_{Jnn : Jnn}((Jnn : Jnn <: lanetype)) = iN($lsizenn((Jnn : Jnn <: lanetype))) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec + syntax lane_{Fnn : Fnn}((Fnn : Fnn <: lanetype)) = fN($sizenn((Fnn : Fnn <: numtype))) + + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec syntax vec_{Vnn : Vnn}(Vnn) = vN($vsizenn(Vnn)) @@ -1899,11 +1895,11 @@ ;; ../../../../specification/wasm-latest/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)) = + syntax vcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: 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)))) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Inn_2 : Inn <: lanetype))) /\ ($lsizenn2((Inn_2 : Inn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Inn_2 : Inn <: 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)))) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Inn_2 : Inn <: lanetype))) /\ ($lsizenn2((Inn_2 : Inn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Inn_2 : Inn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec @@ -1934,7 +1930,7 @@ ;; ../../../../specification/wasm-latest/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))) + -- if ((((sz!`%`_sz.0 * M!`%`_M.0) : nat <:> rat) = (($vsize(vectype) : nat <:> rat) / (2 : nat <:> rat))) /\ (M!`%`_M.0 > 1)) | SPLAT(sz) | ZERO(sz : sz,) -- if (sz!`%`_sz.0 >= 32) @@ -2218,233 +2214,233 @@ ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec rec { -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:585.1-585.44 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:591.1-591.44 def $shift_labelidxs(labelidx*) : labelidx* - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:586.1-586.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:592.1-592.32 def $shift_labelidxs([]) = [] - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:587.1-587.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:593.1-593.66 def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0,)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:588.1-588.91 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:594.1-594.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-latest/1.3-syntax.instructions.spectec rec { -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:421.1-421.30 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:427.1-427.30 def $free_instr(instr : instr) : free - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:436.1-436.26 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:442.1-442.26 def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:437.1-437.34 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:443.1-443.34 def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:438.1-438.27 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:444.1-444.27 def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:439.1-439.86 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:445.1-445.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-latest/1.3-syntax.instructions.spectec:441.1-441.92 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:447.1-447.92 def $free_instr{blocktype : blocktype, `instr*` : instr*}(BLOCK_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:442.1-442.91 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:448.1-448.91 def $free_instr{blocktype : blocktype, `instr*` : instr*}(LOOP_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:443.1-444.79 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:449.1-450.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-latest/1.3-syntax.instructions.spectec:446.1-446.56 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:452.1-452.56 def $free_instr{labelidx : labelidx}(BR_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:447.1-447.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:453.1-453.59 def $free_instr{labelidx : labelidx}(BR_IF_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:448.1-449.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:454.1-455.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-latest/1.3-syntax.instructions.spectec:450.1-450.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:456.1-456.64 def $free_instr{labelidx : labelidx}(BR_ON_NULL_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:451.1-451.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:457.1-457.68 def $free_instr{labelidx : labelidx}(BR_ON_NON_NULL_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:452.1-453.83 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:458.1-459.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-latest/1.3-syntax.instructions.spectec:454.1-455.83 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:460.1-461.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-latest/1.3-syntax.instructions.spectec:457.1-457.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:463.1-463.55 def $free_instr{funcidx : funcidx}(CALL_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:458.1-458.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:464.1-464.59 def $free_instr{typeuse : typeuse}(CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:459.1-460.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:465.1-466.53 def $free_instr{tableidx : tableidx, typeuse : typeuse}(CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:461.1-461.29 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:467.1-467.29 def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:462.1-462.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:468.1-468.62 def $free_instr{funcidx : funcidx}(RETURN_CALL_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:463.1-463.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:469.1-469.66 def $free_instr{typeuse : typeuse}(RETURN_CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:464.1-465.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:470.1-471.53 def $free_instr{tableidx : tableidx, typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:467.1-467.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:473.1-473.53 def $free_instr{tagidx : tagidx}(THROW_instr(tagidx)) = $free_tagidx(tagidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:468.1-468.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:474.1-474.32 def $free_instr(THROW_REF_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:469.1-470.87 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:475.1-476.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-latest/1.3-syntax.instructions.spectec:472.1-472.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:478.1-478.63 def $free_instr{numtype : numtype, numlit : num_(numtype)}(CONST_instr(numtype, numlit)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:473.1-473.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:479.1-479.60 def $free_instr{numtype : numtype, unop : unop_(numtype)}(UNOP_instr(numtype, unop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:474.1-474.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:480.1-480.62 def $free_instr{numtype : numtype, binop : binop_(numtype)}(BINOP_instr(numtype, binop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/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-latest/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-latest/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-latest/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-latest/1.3-syntax.instructions.spectec:481.1-481.64 + def $free_instr{numtype : numtype, testop : testop_(numtype)}(TESTOP_instr(numtype, testop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:482.1-482.62 + def $free_instr{numtype : numtype, relop : relop_(numtype)}(RELOP_instr(numtype, relop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:483.1-484.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-latest/1.3-syntax.instructions.spectec:486.1-486.64 + def $free_instr{vectype : vectype, veclit : vec_(vectype)}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:487.1-487.64 def $free_instr{vectype : vectype, vvunop : vvunop}(VVUNOP_instr(vectype, vvunop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:482.1-482.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:488.1-488.66 def $free_instr{vectype : vectype, vvbinop : vvbinop}(VVBINOP_instr(vectype, vvbinop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:483.1-483.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:489.1-489.68 def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:484.1-484.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:490.1-490.68 def $free_instr{vectype : vectype, vvtestop : vvtestop}(VVTESTOP_instr(vectype, vvtestop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:485.1-485.56 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:491.1-491.56 def $free_instr{shape : shape, vunop : vunop_(shape)}(VUNOP_instr(shape, vunop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:486.1-486.58 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:492.1-492.58 def $free_instr{shape : shape, vbinop : vbinop_(shape)}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:487.1-487.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:493.1-493.60 def $free_instr{shape : shape, vternop : vternop_(shape)}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:488.1-488.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:494.1-494.60 def $free_instr{shape : shape, vtestop : vtestop_(shape)}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:489.1-489.58 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:495.1-495.58 def $free_instr{shape : shape, vrelop : vrelop_(shape)}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:490.1-490.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:496.1-496.64 def $free_instr{ishape : ishape, vshiftop : vshiftop_(ishape)}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape(ishape!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:491.1-491.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:497.1-497.55 def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape(ishape!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:492.1-492.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:498.1-498.66 def $free_instr{bshape : bshape, vswizzlop : vswizzlop_(bshape)}(VSWIZZLOP_instr(bshape, vswizzlop)) = $free_shape(bshape!`%`_bshape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:493.1-493.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:499.1-499.64 def $free_instr{bshape : bshape, `laneidx*` : laneidx*}(VSHUFFLE_instr(bshape, laneidx*{laneidx <- `laneidx*`})) = $free_shape(bshape!`%`_bshape.0) - ;; ../../../../specification/wasm-latest/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-latest/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-latest/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-latest/1.3-syntax.instructions.spectec:500.1-501.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-latest/1.3-syntax.instructions.spectec:502.1-503.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-latest/1.3-syntax.instructions.spectec:504.1-505.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-latest/1.3-syntax.instructions.spectec:506.1-507.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-latest/1.3-syntax.instructions.spectec:502.1-503.47 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:508.1-509.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-latest/1.3-syntax.instructions.spectec:504.1-504.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:510.1-510.51 def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:505.1-505.70 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:511.1-511.70 def $free_instr{shape : shape, `sx?` : sx?, laneidx : laneidx}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:506.1-506.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:512.1-512.66 def $free_instr{shape : shape, laneidx : laneidx}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:508.1-508.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:514.1-514.62 def $free_instr{heaptype : heaptype}(`REF.NULL`_instr(heaptype)) = $free_heaptype(heaptype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:509.1-509.34 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:515.1-515.34 def $free_instr(`REF.IS_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:510.1-510.38 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:516.1-516.38 def $free_instr(`REF.AS_NON_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:511.1-511.29 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:517.1-517.29 def $free_instr(`REF.EQ`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:512.1-512.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:518.1-518.59 def $free_instr{reftype : reftype}(`REF.TEST`_instr(reftype)) = $free_reftype(reftype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:513.1-513.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:519.1-519.59 def $free_instr{reftype : reftype}(`REF.CAST`_instr(reftype)) = $free_reftype(reftype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:514.1-514.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:520.1-520.59 def $free_instr{funcidx : funcidx}(`REF.FUNC`_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:515.1-515.30 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:521.1-521.30 def $free_instr(`REF.I31`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:517.1-517.33 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:523.1-523.33 def $free_instr{sx : sx}(`I31.GET`_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:519.1-519.61 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:525.1-525.61 def $free_instr{typeidx : typeidx}(`STRUCT.NEW`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:520.1-520.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:526.1-526.69 def $free_instr{typeidx : typeidx}(`STRUCT.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:521.1-521.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:527.1-527.69 def $free_instr{`sx?` : sx?, typeidx : typeidx, u32 : u32}(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:522.1-522.65 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:528.1-528.65 def $free_instr{typeidx : typeidx, u32 : u32}(`STRUCT.SET`_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:524.1-524.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:530.1-530.60 def $free_instr{typeidx : typeidx}(`ARRAY.NEW`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:525.1-525.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:531.1-531.68 def $free_instr{typeidx : typeidx}(`ARRAY.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:526.1-526.70 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:532.1-532.70 def $free_instr{typeidx : typeidx, u32 : u32}(`ARRAY.NEW_FIXED`_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:527.1-528.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:533.1-534.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(`ARRAY.NEW_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:529.1-530.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:535.1-536.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:531.1-531.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:537.1-537.64 def $free_instr{`sx?` : sx?, typeidx : typeidx}(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:532.1-532.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:538.1-538.60 def $free_instr{typeidx : typeidx}(`ARRAY.SET`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:533.1-533.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:539.1-539.32 def $free_instr(`ARRAY.LEN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:534.1-534.61 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:540.1-540.61 def $free_instr{typeidx : typeidx}(`ARRAY.FILL`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:535.1-536.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:541.1-542.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-latest/1.3-syntax.instructions.spectec:537.1-538.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:543.1-544.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(`ARRAY.INIT_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:539.1-540.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:545.1-546.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:542.1-542.41 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:548.1-548.41 def $free_instr(`EXTERN.CONVERT_ANY`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:543.1-543.41 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:549.1-549.41 def $free_instr(`ANY.CONVERT_EXTERN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:545.1-545.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:551.1-551.63 def $free_instr{localidx : localidx}(`LOCAL.GET`_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:546.1-546.63 - def $free_instr{localidx : localidx}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:547.1-547.63 - def $free_instr{localidx : localidx}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:549.1-549.67 - def $free_instr{globalidx : globalidx}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:550.1-550.67 - def $free_instr{globalidx : globalidx}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:552.1-552.63 - def $free_instr{tableidx : tableidx}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + def $free_instr{localidx : localidx}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:553.1-553.63 + def $free_instr{localidx : localidx}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:555.1-555.67 + def $free_instr{globalidx : globalidx}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:556.1-556.67 + def $free_instr{globalidx : globalidx}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:558.1-558.63 + def $free_instr{tableidx : tableidx}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:559.1-559.63 def $free_instr{tableidx : tableidx}(`TABLE.SET`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:554.1-554.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:560.1-560.64 def $free_instr{tableidx : tableidx}(`TABLE.SIZE`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:555.1-555.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:561.1-561.64 def $free_instr{tableidx : tableidx}(`TABLE.GROW`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:556.1-556.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:562.1-562.64 def $free_instr{tableidx : tableidx}(`TABLE.FILL`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:557.1-558.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:563.1-564.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-latest/1.3-syntax.instructions.spectec:559.1-560.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:565.1-566.53 def $free_instr{tableidx : tableidx, elemidx : elemidx}(`TABLE.INIT`_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:561.1-561.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:567.1-567.60 def $free_instr{elemidx : elemidx}(`ELEM.DROP`_instr(elemidx)) = $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/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-latest/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-latest/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-latest/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) + 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-latest/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) + 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-latest/1.3-syntax.instructions.spectec:573.1-574.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-latest/1.3-syntax.instructions.spectec:575.1-576.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-latest/1.3-syntax.instructions.spectec:577.1-578.49 + def $free_instr{vectype : vectype, memidx : memidx, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:579.1-580.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-latest/1.3-syntax.instructions.spectec:575.1-575.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:581.1-581.59 def $free_instr{memidx : memidx}(`MEMORY.SIZE`_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:576.1-576.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:582.1-582.59 def $free_instr{memidx : memidx}(`MEMORY.GROW`_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:577.1-577.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:583.1-583.59 def $free_instr{memidx : memidx}(`MEMORY.FILL`_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:578.1-579.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:584.1-585.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-latest/1.3-syntax.instructions.spectec:580.1-581.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:586.1-587.49 def $free_instr{memidx : memidx, dataidx : dataidx}(`MEMORY.INIT`_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:582.1-582.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:588.1-588.60 def $free_instr{dataidx : dataidx}(`DATA.DROP`_instr(dataidx)) = $free_dataidx(dataidx) -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:422.1-422.31 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:428.1-428.31 def $free_block(instr*) : free - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:590.1-591.47 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:596.1-597.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*`})) } @@ -4822,7 +4818,9 @@ ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec def $lpacknum_(lanetype : lanetype, num_ : num_($lunpack(lanetype))) : lane_(lanetype) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $lpacknum_{numtype : numtype, c : num_($lunpack((numtype : numtype <: lanetype)))}((numtype : numtype <: lanetype), c) = c + def $lpacknum_{Inn : Inn, c : num_($lunpack((Inn : Inn <: lanetype)))}((Inn : Inn <: lanetype), c) = c + ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec + def $lpacknum_{Fnn : Fnn, c : num_($lunpack((Fnn : Fnn <: lanetype)))}((Fnn : Fnn <: lanetype), c) = c ;; ../../../../specification/wasm-latest/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) @@ -4836,7 +4834,9 @@ ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec def $lunpacknum_(lanetype : lanetype, lane_ : lane_(lanetype)) : num_($lunpack(lanetype)) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $lunpacknum_{numtype : numtype, c : lane_((numtype : numtype <: lanetype))}((numtype : numtype <: lanetype), c) = c + def $lunpacknum_{Inn : Inn, c : lane_((Inn : Inn <: lanetype))}((Inn : Inn <: lanetype), c) = c + ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec + def $lunpacknum_{Fnn : Fnn, c : lane_((Fnn : Fnn <: lanetype))}((Fnn : Fnn <: lanetype), c) = c ;; ../../../../specification/wasm-latest/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) @@ -4981,9 +4981,9 @@ ;; ../../../../specification/wasm-latest/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-latest/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?`} + def $zeroop{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: lanetype), M_2), TRUNC_SAT_vcvtop__(sx, zero?{zero <- `zero?`})) = zero?{zero <- `zero?`} ;; ../../../../specification/wasm-latest/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?`} + def $zeroop{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: lanetype), M_2), RELAXED_TRUNC_vcvtop__(sx, zero?{zero <- `zero?`})) = zero?{zero <- `zero?`} ;; ../../../../specification/wasm-latest/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-latest/3.2-numerics.vector.spectec @@ -4996,9 +4996,9 @@ ;; ../../../../specification/wasm-latest/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-latest/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?`})) = ?() + def $halfop{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: lanetype), M_2), TRUNC_SAT_vcvtop__(sx, zero?{zero <- `zero?`})) = ?() ;; ../../../../specification/wasm-latest/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?`})) = ?() + def $halfop{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: lanetype), M_2), RELAXED_TRUNC_vcvtop__(sx, zero?{zero <- `zero?`})) = ?() ;; ../../../../specification/wasm-latest/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-latest/3.2-numerics.vector.spectec @@ -6350,7 +6350,7 @@ ;; ../../../../specification/wasm-latest/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]) + -- if (c_2 = $lunpacknum_((nt : numtype <: lanetype), $lanes_(`%X%`_shape((nt : numtype <: lanetype), M), c_1)[i!`%`_laneidx.0])) ;; ../../../../specification/wasm-latest/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)}: @@ -6682,7 +6682,7 @@ ;; ../../../../specification/wasm-latest/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)]) + `%~>%`(`%;%`_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_($iadd_($size((at : addrtype <: numtype)), `%`_iN(i!`%`_num_.0,), `%`_iN(1,))!`%`_iN.0,)) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `MEMORY.FILL`_instr(x)]) -- otherwise ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec @@ -6698,7 +6698,7 @@ ;; ../../../../specification/wasm-latest/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)]) + `%~>%`(`%;%`_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_($iadd_($size((at_1 : addrtype <: numtype)), `%`_iN(i_1!`%`_num_.0,), `%`_iN(1,))!`%`_iN.0,)) CONST_instr((at_2 : addrtype <: numtype), `%`_num_($iadd_($size((at_2 : addrtype <: numtype)), `%`_iN(i_2!`%`_num_.0,), `%`_iN(1,))!`%`_iN.0,)) 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) @@ -6720,7 +6720,7 @@ ;; ../../../../specification/wasm-latest/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)]) + `%~>%`(`%;%`_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_($iadd_($size((at : addrtype <: numtype)), `%`_iN(i!`%`_num_.0,), `%`_iN(1,))!`%`_iN.0,)) CONST_instr(I32_numtype, $iadd_(32, j, `%`_iN(1,))) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `MEMORY.INIT`_instr(x, y)]) -- otherwise ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec @@ -7711,6 +7711,7 @@ ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec rule _{s : store, `b*` : byte*}: `%|-%:%`(s, {BYTES b*{b <- `b*`}}, OK_datatype) + -- if (|b*{b <- `b*`}| < (2 ^ 32)) ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec relation Eleminst_ok: `%|-%:%`(store, eleminst, elemtype) @@ -7719,6 +7720,7 @@ `%|-%:%`(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*`} + -- if (|ref*{ref <- `ref*`}| < (2 ^ 32)) ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec relation Exportinst_ok: `%|-%:OK`(store, exportinst) @@ -7789,51 +7791,50 @@ -- 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-latest/7.1-soundness.configurations.spectec:37.1-42.35 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:37.1-41.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*`},)) + -- Expr_ok2: `%;%|-%:%`(s, C' +++ {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(`%`_resulttype(t^n{t <- `t*`},)), REFS [], RECS []}, 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-latest/7.1-soundness.configurations.spectec:44.1-47.49 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:43.1-46.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-latest/7.1-soundness.configurations.spectec:49.1-51.42 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:48.1-50.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-latest/7.1-soundness.configurations.spectec:5.1-6.36 relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:54.1-55.27 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:53.1-54.27 rule empty{s : store, C : context}: `%;%|-%:%`(s, C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:57.1-59.50 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:56.1-58.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-latest/7.1-soundness.configurations.spectec:61.1-65.86 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:60.1-64.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-latest/7.1-soundness.configurations.spectec:67.1-71.33 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:66.1-70.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-latest/7.1-soundness.configurations.spectec:74.1-77.33 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:73.1-76.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*`},))) @@ -7841,7 +7842,7 @@ ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:7.1-8.36 relation Expr_ok2: `%;%|-%:%`(store, context, expr, resulttype) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:80.1-82.44 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:79.1-81.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*`},))) @@ -7917,30 +7918,30 @@ ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec rec { -;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:230.1-231.50 +;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:231.1-232.50 relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:244.1-247.35 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:245.1-248.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-latest/7.1-soundness.configurations.spectec:249.1-252.20 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:250.1-253.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-latest/7.1-soundness.configurations.spectec:254.1-256.42 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:255.1-257.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-latest/7.1-soundness.configurations.spectec:258.1-259.44 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:259.1-260.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-latest/7.1-soundness.configurations.spectec:261.1-262.28 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:262.1-263.28 rule `ref.extern`{ref : ref, s : store}: `%>>_%%`(`REF.EXTERN`_fieldval(ref), s, (ref : ref <: fieldval)) } @@ -13026,15 +13027,16 @@ ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:401.1-401.59 -def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*) +;; ../../../../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([], []) = ([], []) + def $minus_recs([], []) = ?(([], [])) ;; ../../../../specification/wasm-latest/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*`}) + 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-latest/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*`})) + 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*`}))) + def $minus_recs{x0 : typevar*, x1 : typeuse*}(x0, x1) = ?() } ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec @@ -13118,7 +13120,7 @@ def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype ;; ../../../../specification/wasm-latest/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*`})) + -- if ((tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = !($minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}))) ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:354.1-354.112 def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype @@ -13434,17 +13436,13 @@ ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec syntax lane_(lanetype : lanetype) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec - syntax lane_{numtype : numtype}((numtype : numtype <: lanetype)) = num_(numtype) - - - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec - syntax lane_{packtype : packtype}((packtype : packtype <: lanetype)) = pack_(packtype) - - - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec syntax lane_{Jnn : Jnn}((Jnn : Jnn <: lanetype)) = iN($lsizenn((Jnn : Jnn <: lanetype))) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec + syntax lane_{Fnn : Fnn}((Fnn : Fnn <: lanetype)) = fN($sizenn((Fnn : Fnn <: numtype))) + + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec syntax vec_{Vnn : Vnn}(Vnn) = vN($vsizenn(Vnn)) @@ -13794,11 +13792,11 @@ ;; ../../../../specification/wasm-latest/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)) = + syntax vcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: 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)))) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Inn_2 : Inn <: lanetype))) /\ ($lsizenn2((Inn_2 : Inn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Inn_2 : Inn <: 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)))) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Inn_2 : Inn <: lanetype))) /\ ($lsizenn2((Inn_2 : Inn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Inn_2 : Inn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec @@ -13829,7 +13827,7 @@ ;; ../../../../specification/wasm-latest/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))) + -- if ((((sz!`%`_sz.0 * M!`%`_M.0) : nat <:> rat) = (($vsize(vectype) : nat <:> rat) / (2 : nat <:> rat))) /\ (M!`%`_M.0 > 1)) | SPLAT(sz) | ZERO(sz : sz,) -- if (sz!`%`_sz.0 >= 32) @@ -14113,233 +14111,233 @@ ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec rec { -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:585.1-585.44 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:591.1-591.44 def $shift_labelidxs(labelidx*) : labelidx* - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:586.1-586.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:592.1-592.32 def $shift_labelidxs([]) = [] - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:587.1-587.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:593.1-593.66 def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0,)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:588.1-588.91 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:594.1-594.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-latest/1.3-syntax.instructions.spectec rec { -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:421.1-421.30 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:427.1-427.30 def $free_instr(instr : instr) : free - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:436.1-436.26 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:442.1-442.26 def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:437.1-437.34 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:443.1-443.34 def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:438.1-438.27 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:444.1-444.27 def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:439.1-439.86 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:445.1-445.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-latest/1.3-syntax.instructions.spectec:441.1-441.92 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:447.1-447.92 def $free_instr{blocktype : blocktype, `instr*` : instr*}(BLOCK_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:442.1-442.91 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:448.1-448.91 def $free_instr{blocktype : blocktype, `instr*` : instr*}(LOOP_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:443.1-444.79 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:449.1-450.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-latest/1.3-syntax.instructions.spectec:446.1-446.56 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:452.1-452.56 def $free_instr{labelidx : labelidx}(BR_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:447.1-447.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:453.1-453.59 def $free_instr{labelidx : labelidx}(BR_IF_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:448.1-449.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:454.1-455.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-latest/1.3-syntax.instructions.spectec:450.1-450.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:456.1-456.64 def $free_instr{labelidx : labelidx}(BR_ON_NULL_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:451.1-451.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:457.1-457.68 def $free_instr{labelidx : labelidx}(BR_ON_NON_NULL_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:452.1-453.83 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:458.1-459.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-latest/1.3-syntax.instructions.spectec:454.1-455.83 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:460.1-461.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-latest/1.3-syntax.instructions.spectec:457.1-457.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:463.1-463.55 def $free_instr{funcidx : funcidx}(CALL_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:458.1-458.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:464.1-464.59 def $free_instr{typeuse : typeuse}(CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:459.1-460.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:465.1-466.53 def $free_instr{tableidx : tableidx, typeuse : typeuse}(CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:461.1-461.29 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:467.1-467.29 def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:462.1-462.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:468.1-468.62 def $free_instr{funcidx : funcidx}(RETURN_CALL_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:463.1-463.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:469.1-469.66 def $free_instr{typeuse : typeuse}(RETURN_CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:464.1-465.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:470.1-471.53 def $free_instr{tableidx : tableidx, typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:467.1-467.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:473.1-473.53 def $free_instr{tagidx : tagidx}(THROW_instr(tagidx)) = $free_tagidx(tagidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:468.1-468.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:474.1-474.32 def $free_instr(THROW_REF_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:469.1-470.87 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:475.1-476.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-latest/1.3-syntax.instructions.spectec:472.1-472.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:478.1-478.63 def $free_instr{numtype : numtype, numlit : num_(numtype)}(CONST_instr(numtype, numlit)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:473.1-473.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:479.1-479.60 def $free_instr{numtype : numtype, unop : unop_(numtype)}(UNOP_instr(numtype, unop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:474.1-474.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:480.1-480.62 def $free_instr{numtype : numtype, binop : binop_(numtype)}(BINOP_instr(numtype, binop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/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-latest/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-latest/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-latest/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-latest/1.3-syntax.instructions.spectec:481.1-481.64 + def $free_instr{numtype : numtype, testop : testop_(numtype)}(TESTOP_instr(numtype, testop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:482.1-482.62 + def $free_instr{numtype : numtype, relop : relop_(numtype)}(RELOP_instr(numtype, relop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:483.1-484.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-latest/1.3-syntax.instructions.spectec:486.1-486.64 + def $free_instr{vectype : vectype, veclit : vec_(vectype)}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:487.1-487.64 def $free_instr{vectype : vectype, vvunop : vvunop}(VVUNOP_instr(vectype, vvunop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:482.1-482.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:488.1-488.66 def $free_instr{vectype : vectype, vvbinop : vvbinop}(VVBINOP_instr(vectype, vvbinop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:483.1-483.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:489.1-489.68 def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:484.1-484.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:490.1-490.68 def $free_instr{vectype : vectype, vvtestop : vvtestop}(VVTESTOP_instr(vectype, vvtestop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:485.1-485.56 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:491.1-491.56 def $free_instr{shape : shape, vunop : vunop_(shape)}(VUNOP_instr(shape, vunop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:486.1-486.58 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:492.1-492.58 def $free_instr{shape : shape, vbinop : vbinop_(shape)}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:487.1-487.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:493.1-493.60 def $free_instr{shape : shape, vternop : vternop_(shape)}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:488.1-488.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:494.1-494.60 def $free_instr{shape : shape, vtestop : vtestop_(shape)}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:489.1-489.58 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:495.1-495.58 def $free_instr{shape : shape, vrelop : vrelop_(shape)}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:490.1-490.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:496.1-496.64 def $free_instr{ishape : ishape, vshiftop : vshiftop_(ishape)}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape(ishape!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:491.1-491.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:497.1-497.55 def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape(ishape!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:492.1-492.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:498.1-498.66 def $free_instr{bshape : bshape, vswizzlop : vswizzlop_(bshape)}(VSWIZZLOP_instr(bshape, vswizzlop)) = $free_shape(bshape!`%`_bshape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:493.1-493.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:499.1-499.64 def $free_instr{bshape : bshape, `laneidx*` : laneidx*}(VSHUFFLE_instr(bshape, laneidx*{laneidx <- `laneidx*`})) = $free_shape(bshape!`%`_bshape.0) - ;; ../../../../specification/wasm-latest/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-latest/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-latest/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-latest/1.3-syntax.instructions.spectec:500.1-501.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-latest/1.3-syntax.instructions.spectec:502.1-503.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-latest/1.3-syntax.instructions.spectec:504.1-505.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-latest/1.3-syntax.instructions.spectec:506.1-507.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-latest/1.3-syntax.instructions.spectec:502.1-503.47 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:508.1-509.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-latest/1.3-syntax.instructions.spectec:504.1-504.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:510.1-510.51 def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:505.1-505.70 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:511.1-511.70 def $free_instr{shape : shape, `sx?` : sx?, laneidx : laneidx}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:506.1-506.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:512.1-512.66 def $free_instr{shape : shape, laneidx : laneidx}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:508.1-508.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:514.1-514.62 def $free_instr{heaptype : heaptype}(`REF.NULL`_instr(heaptype)) = $free_heaptype(heaptype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:509.1-509.34 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:515.1-515.34 def $free_instr(`REF.IS_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:510.1-510.38 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:516.1-516.38 def $free_instr(`REF.AS_NON_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:511.1-511.29 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:517.1-517.29 def $free_instr(`REF.EQ`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:512.1-512.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:518.1-518.59 def $free_instr{reftype : reftype}(`REF.TEST`_instr(reftype)) = $free_reftype(reftype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:513.1-513.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:519.1-519.59 def $free_instr{reftype : reftype}(`REF.CAST`_instr(reftype)) = $free_reftype(reftype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:514.1-514.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:520.1-520.59 def $free_instr{funcidx : funcidx}(`REF.FUNC`_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:515.1-515.30 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:521.1-521.30 def $free_instr(`REF.I31`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:517.1-517.33 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:523.1-523.33 def $free_instr{sx : sx}(`I31.GET`_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:519.1-519.61 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:525.1-525.61 def $free_instr{typeidx : typeidx}(`STRUCT.NEW`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:520.1-520.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:526.1-526.69 def $free_instr{typeidx : typeidx}(`STRUCT.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:521.1-521.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:527.1-527.69 def $free_instr{`sx?` : sx?, typeidx : typeidx, u32 : u32}(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:522.1-522.65 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:528.1-528.65 def $free_instr{typeidx : typeidx, u32 : u32}(`STRUCT.SET`_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:524.1-524.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:530.1-530.60 def $free_instr{typeidx : typeidx}(`ARRAY.NEW`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:525.1-525.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:531.1-531.68 def $free_instr{typeidx : typeidx}(`ARRAY.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:526.1-526.70 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:532.1-532.70 def $free_instr{typeidx : typeidx, u32 : u32}(`ARRAY.NEW_FIXED`_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:527.1-528.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:533.1-534.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(`ARRAY.NEW_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:529.1-530.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:535.1-536.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:531.1-531.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:537.1-537.64 def $free_instr{`sx?` : sx?, typeidx : typeidx}(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:532.1-532.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:538.1-538.60 def $free_instr{typeidx : typeidx}(`ARRAY.SET`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:533.1-533.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:539.1-539.32 def $free_instr(`ARRAY.LEN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:534.1-534.61 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:540.1-540.61 def $free_instr{typeidx : typeidx}(`ARRAY.FILL`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:535.1-536.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:541.1-542.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-latest/1.3-syntax.instructions.spectec:537.1-538.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:543.1-544.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(`ARRAY.INIT_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:539.1-540.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:545.1-546.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:542.1-542.41 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:548.1-548.41 def $free_instr(`EXTERN.CONVERT_ANY`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:543.1-543.41 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:549.1-549.41 def $free_instr(`ANY.CONVERT_EXTERN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:545.1-545.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:551.1-551.63 def $free_instr{localidx : localidx}(`LOCAL.GET`_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:546.1-546.63 - def $free_instr{localidx : localidx}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:547.1-547.63 - def $free_instr{localidx : localidx}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:549.1-549.67 - def $free_instr{globalidx : globalidx}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:550.1-550.67 - def $free_instr{globalidx : globalidx}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:552.1-552.63 - def $free_instr{tableidx : tableidx}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + def $free_instr{localidx : localidx}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:553.1-553.63 + def $free_instr{localidx : localidx}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:555.1-555.67 + def $free_instr{globalidx : globalidx}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:556.1-556.67 + def $free_instr{globalidx : globalidx}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:558.1-558.63 + def $free_instr{tableidx : tableidx}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:559.1-559.63 def $free_instr{tableidx : tableidx}(`TABLE.SET`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:554.1-554.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:560.1-560.64 def $free_instr{tableidx : tableidx}(`TABLE.SIZE`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:555.1-555.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:561.1-561.64 def $free_instr{tableidx : tableidx}(`TABLE.GROW`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:556.1-556.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:562.1-562.64 def $free_instr{tableidx : tableidx}(`TABLE.FILL`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:557.1-558.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:563.1-564.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-latest/1.3-syntax.instructions.spectec:559.1-560.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:565.1-566.53 def $free_instr{tableidx : tableidx, elemidx : elemidx}(`TABLE.INIT`_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:561.1-561.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:567.1-567.60 def $free_instr{elemidx : elemidx}(`ELEM.DROP`_instr(elemidx)) = $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/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-latest/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-latest/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-latest/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) + 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-latest/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) + 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-latest/1.3-syntax.instructions.spectec:573.1-574.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-latest/1.3-syntax.instructions.spectec:575.1-576.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-latest/1.3-syntax.instructions.spectec:577.1-578.49 + def $free_instr{vectype : vectype, memidx : memidx, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:579.1-580.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-latest/1.3-syntax.instructions.spectec:575.1-575.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:581.1-581.59 def $free_instr{memidx : memidx}(`MEMORY.SIZE`_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:576.1-576.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:582.1-582.59 def $free_instr{memidx : memidx}(`MEMORY.GROW`_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:577.1-577.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:583.1-583.59 def $free_instr{memidx : memidx}(`MEMORY.FILL`_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:578.1-579.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:584.1-585.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-latest/1.3-syntax.instructions.spectec:580.1-581.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:586.1-587.49 def $free_instr{memidx : memidx, dataidx : dataidx}(`MEMORY.INIT`_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:582.1-582.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:588.1-588.60 def $free_instr{dataidx : dataidx}(`DATA.DROP`_instr(dataidx)) = $free_dataidx(dataidx) -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:422.1-422.31 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:428.1-428.31 def $free_block(instr*) : free - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:590.1-591.47 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:596.1-597.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*`})) } @@ -16717,7 +16715,9 @@ ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec def $lpacknum_(lanetype : lanetype, num_ : num_($lunpack(lanetype))) : lane_(lanetype) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $lpacknum_{numtype : numtype, c : num_($lunpack((numtype : numtype <: lanetype)))}((numtype : numtype <: lanetype), c) = c + def $lpacknum_{Inn : Inn, c : num_($lunpack((Inn : Inn <: lanetype)))}((Inn : Inn <: lanetype), c) = c + ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec + def $lpacknum_{Fnn : Fnn, c : num_($lunpack((Fnn : Fnn <: lanetype)))}((Fnn : Fnn <: lanetype), c) = c ;; ../../../../specification/wasm-latest/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) @@ -16731,7 +16731,9 @@ ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec def $lunpacknum_(lanetype : lanetype, lane_ : lane_(lanetype)) : num_($lunpack(lanetype)) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $lunpacknum_{numtype : numtype, c : lane_((numtype : numtype <: lanetype))}((numtype : numtype <: lanetype), c) = c + def $lunpacknum_{Inn : Inn, c : lane_((Inn : Inn <: lanetype))}((Inn : Inn <: lanetype), c) = c + ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec + def $lunpacknum_{Fnn : Fnn, c : lane_((Fnn : Fnn <: lanetype))}((Fnn : Fnn <: lanetype), c) = c ;; ../../../../specification/wasm-latest/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) @@ -16876,9 +16878,9 @@ ;; ../../../../specification/wasm-latest/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-latest/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?`} + def $zeroop{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: lanetype), M_2), TRUNC_SAT_vcvtop__(sx, zero?{zero <- `zero?`})) = zero?{zero <- `zero?`} ;; ../../../../specification/wasm-latest/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?`} + def $zeroop{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: lanetype), M_2), RELAXED_TRUNC_vcvtop__(sx, zero?{zero <- `zero?`})) = zero?{zero <- `zero?`} ;; ../../../../specification/wasm-latest/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-latest/3.2-numerics.vector.spectec @@ -16891,9 +16893,9 @@ ;; ../../../../specification/wasm-latest/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-latest/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?`})) = ?() + def $halfop{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: lanetype), M_2), TRUNC_SAT_vcvtop__(sx, zero?{zero <- `zero?`})) = ?() ;; ../../../../specification/wasm-latest/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?`})) = ?() + def $halfop{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: lanetype), M_2), RELAXED_TRUNC_vcvtop__(sx, zero?{zero <- `zero?`})) = ?() ;; ../../../../specification/wasm-latest/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-latest/3.2-numerics.vector.spectec @@ -16928,11 +16930,12 @@ -- otherwise ;; ../../../../specification/wasm-latest/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)* +def $ivunop_(shape : shape, def $f_(N : N, iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)*? ;; ../../../../specification/wasm-latest/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*`})] + 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*`}) + def $ivunop_{x0 : shape, x2 : vec_(V128_Vnn)}(x0, def $f_, x2) = ?() ;; ../../../../specification/wasm-latest/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)* @@ -16942,20 +16945,22 @@ -- 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-latest/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)* +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-latest/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*`})] + 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*`}) + def $ivbinop_{x0 : shape, x2 : vec_(V128_Vnn), x3 : vec_(V128_Vnn)}(x0, def $f_, x2, x3) = ?() ;; ../../../../specification/wasm-latest/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)* +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-latest/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*`})] + 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*`}) + def $ivbinopsx_{x0 : shape, x2 : sx, x3 : vec_(V128_Vnn), x4 : vec_(V128_Vnn)}(x0, def $f_, x2, x3, x4) = ?() ;; ../../../../specification/wasm-latest/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)* @@ -17017,18 +17022,20 @@ -- if ($isize(Inn) = $fsize(Fnn)) ;; ../../../../specification/wasm-latest/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) +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-latest/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*`}) + 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*`}) + def $ivshiftop_{x0 : shape, x2 : vec_(V128_Vnn), x3 : u32}(x0, def $f_, x2, x3) = ?() ;; ../../../../specification/wasm-latest/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) +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-latest/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*`}) + 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*`}) + def $ivshiftopsx_{x0 : shape, x2 : sx, x3 : vec_(V128_Vnn), x4 : u32}(x0, def $f_, x2, x3, x4) = ?() ;; ../../../../specification/wasm-latest/3.2-numerics.vector.spectec def $ivbitmaskop_(shape : shape, vec_ : vec_(V128_Vnn)) : u32 @@ -17038,20 +17045,22 @@ -- 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-latest/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) +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-latest/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*`}) + 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*`}) + def $ivswizzlop_{x0 : shape, x2 : vec_(V128_Vnn), x3 : vec_(V128_Vnn)}(x0, def $f_, x2, x3) = ?() ;; ../../../../specification/wasm-latest/3.2-numerics.vector.spectec -def $ivshufflop_(shape : shape, laneidx*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) +def $ivshufflop_(shape : shape, laneidx*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)? ;; ../../../../specification/wasm-latest/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*`}) + 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*`}) + def $ivshufflop_{x0 : shape, x1 : laneidx*, x2 : vec_(V128_Vnn), x3 : vec_(V128_Vnn)}(x0, x1, x2, x3) = ?() ;; ../../../../specification/wasm-latest/3.2-numerics.vector.spectec def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_(vectype)) : vec_(vectype)* @@ -17091,32 +17100,32 @@ ;; ../../../../specification/wasm-latest/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-latest/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) + 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-latest/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) + 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-latest/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) + 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-latest/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-latest/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) + 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-latest/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) + 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-latest/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) + 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-latest/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) + 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-latest/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) + 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-latest/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) + 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-latest/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) + 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-latest/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) + 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-latest/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) + 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-latest/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-latest/3.2-numerics.vector.spectec @@ -17221,9 +17230,9 @@ ;; ../../../../specification/wasm-latest/3.2-numerics.vector.spectec def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_(ishape), vec_ : vec_(V128_Vnn), u32 : u32) : vec_(V128_Vnn) ;; ../../../../specification/wasm-latest/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))),)) + 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-latest/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))),)) + 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-latest/3.2-numerics.vector.spectec def $vbitmaskop_(ishape : ishape, vec_ : vec_(V128_Vnn)) : u32 @@ -17233,14 +17242,15 @@ ;; ../../../../specification/wasm-latest/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-latest/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) + 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-latest/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) + 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-latest/3.2-numerics.vector.spectec -def $vshufflop_(bshape : bshape, laneidx*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) +def $vshufflop_(bshape : bshape, laneidx*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)? ;; ../../../../specification/wasm-latest/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) + 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))) + def $vshufflop_{x0 : bshape, x1 : laneidx*, x2 : vec_(V128_Vnn), x3 : vec_(V128_Vnn)}(x0, x1, x2, x3) = ?() ;; ../../../../specification/wasm-latest/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) @@ -18237,7 +18247,7 @@ ;; ../../../../specification/wasm-latest/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)) + -- if (c = !($vshufflop_(sh, i*{i <- `i*`}, c_1, c_2))) ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec rule vsplat{Lnn : Lnn, c_1 : num_($lunpack(Lnn)), M : M, c : vec_(V128_Vnn)}: @@ -18247,7 +18257,7 @@ ;; ../../../../specification/wasm-latest/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]) + -- if (c_2 = $lunpacknum_((nt : numtype <: lanetype), $lanes_(`%X%`_shape((nt : numtype <: lanetype), M), c_1)[i!`%`_laneidx.0])) ;; ../../../../specification/wasm-latest/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)}: @@ -18579,7 +18589,7 @@ ;; ../../../../specification/wasm-latest/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)]) + `%~>%`(`%;%`_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_($iadd_($size((at : addrtype <: numtype)), `%`_iN(i!`%`_num_.0,), `%`_iN(1,))!`%`_iN.0,)) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `MEMORY.FILL`_instr(x)]) -- otherwise ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec @@ -18595,7 +18605,7 @@ ;; ../../../../specification/wasm-latest/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)]) + `%~>%`(`%;%`_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_($iadd_($size((at_1 : addrtype <: numtype)), `%`_iN(i_1!`%`_num_.0,), `%`_iN(1,))!`%`_iN.0,)) CONST_instr((at_2 : addrtype <: numtype), `%`_num_($iadd_($size((at_2 : addrtype <: numtype)), `%`_iN(i_2!`%`_num_.0,), `%`_iN(1,))!`%`_iN.0,)) 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) @@ -18617,7 +18627,7 @@ ;; ../../../../specification/wasm-latest/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)]) + `%~>%`(`%;%`_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_($iadd_($size((at : addrtype <: numtype)), `%`_iN(i!`%`_num_.0,), `%`_iN(1,))!`%`_iN.0,)) CONST_instr(I32_numtype, $iadd_(32, j, `%`_iN(1,))) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `MEMORY.INIT`_instr(x, y)]) -- otherwise ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec @@ -19608,6 +19618,7 @@ ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec rule _{s : store, `b*` : byte*}: `%|-%:%`(s, {BYTES b*{b <- `b*`}}, OK_datatype) + -- if (|b*{b <- `b*`}| < (2 ^ 32)) ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec relation Eleminst_ok: `%|-%:%`(store, eleminst, elemtype) @@ -19616,6 +19627,7 @@ `%|-%:%`(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*`} + -- if (|ref*{ref <- `ref*`}| < (2 ^ 32)) ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec relation Exportinst_ok: `%|-%:OK`(store, exportinst) @@ -19686,51 +19698,50 @@ -- 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-latest/7.1-soundness.configurations.spectec:37.1-42.35 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:37.1-41.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*`},)) + -- Expr_ok2: `%;%|-%:%`(s, C' +++ {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(`%`_resulttype(t^n{t <- `t*`},)), REFS [], RECS []}, 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-latest/7.1-soundness.configurations.spectec:44.1-47.49 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:43.1-46.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-latest/7.1-soundness.configurations.spectec:49.1-51.42 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:48.1-50.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-latest/7.1-soundness.configurations.spectec:5.1-6.36 relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:54.1-55.27 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:53.1-54.27 rule empty{s : store, C : context}: `%;%|-%:%`(s, C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:57.1-59.50 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:56.1-58.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-latest/7.1-soundness.configurations.spectec:61.1-65.86 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:60.1-64.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-latest/7.1-soundness.configurations.spectec:67.1-71.33 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:66.1-70.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-latest/7.1-soundness.configurations.spectec:74.1-77.33 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:73.1-76.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*`},))) @@ -19738,7 +19749,7 @@ ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:7.1-8.36 relation Expr_ok2: `%;%|-%:%`(store, context, expr, resulttype) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:80.1-82.44 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:79.1-81.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*`},))) @@ -19814,30 +19825,30 @@ ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec rec { -;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:230.1-231.50 +;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:231.1-232.50 relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:244.1-247.35 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:245.1-248.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-latest/7.1-soundness.configurations.spectec:249.1-252.20 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:250.1-253.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-latest/7.1-soundness.configurations.spectec:254.1-256.42 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:255.1-257.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-latest/7.1-soundness.configurations.spectec:258.1-259.44 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:259.1-260.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-latest/7.1-soundness.configurations.spectec:261.1-262.28 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:262.1-263.28 rule `ref.extern`{ref : ref, s : store}: `%>>_%%`(`REF.EXTERN`_fieldval(ref), s, (ref : ref <: fieldval)) } @@ -24923,15 +24934,16 @@ ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec rec { -;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:401.1-401.59 -def $minus_recs(typevar*, typeuse*) : (typevar*, typeuse*) +;; ../../../../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([], []) = ([], []) + def $minus_recs([], []) = ?(([], [])) ;; ../../../../specification/wasm-latest/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*`}) + 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-latest/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*`})) + 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*`}))) + def $minus_recs{x0 : typevar*, x1 : typeuse*}(x0, x1) = ?() } ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec @@ -25015,7 +25027,7 @@ def $subst_rectype(rectype : rectype, typevar*, typeuse*) : rectype ;; ../../../../specification/wasm-latest/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*`})) + -- if ((tv'*{tv' <- `tv'*`}, tu'*{tu' <- `tu'*`}) = !($minus_recs(tv*{tv <- `tv*`}, tu*{tu <- `tu*`}))) ;; ../../../../specification/wasm-latest/1.2-syntax.types.spectec:354.1-354.112 def $subst_deftype(deftype : deftype, typevar*, typeuse*) : deftype @@ -25331,17 +25343,13 @@ ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec syntax lane_(lanetype : lanetype) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec - syntax lane_{numtype : numtype}((numtype : numtype <: lanetype)) = num_(numtype) - - - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec - syntax lane_{packtype : packtype}((packtype : packtype <: lanetype)) = pack_(packtype) - - - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec syntax lane_{Jnn : Jnn}((Jnn : Jnn <: lanetype)) = iN($lsizenn((Jnn : Jnn <: lanetype))) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec + syntax lane_{Fnn : Fnn}((Fnn : Fnn <: lanetype)) = fN($sizenn((Fnn : Fnn <: numtype))) + + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec syntax vec_{Vnn : Vnn}(Vnn) = vN($vsizenn(Vnn)) @@ -25691,11 +25699,11 @@ ;; ../../../../specification/wasm-latest/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)) = + syntax vcvtop__{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: 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)))) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Inn_2 : Inn <: lanetype))) /\ ($lsizenn2((Inn_2 : Inn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Inn_2 : Inn <: 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)))) + -- if (((($sizenn1((Fnn_1 : Fnn <: numtype)) = $lsizenn2((Inn_2 : Inn <: lanetype))) /\ ($lsizenn2((Inn_2 : Inn <: lanetype)) = 32)) /\ (zero?{zero <- `zero?`} = ?())) \/ (($sizenn1((Fnn_1 : Fnn <: numtype)) = (2 * $lsizenn2((Inn_2 : Inn <: lanetype)))) /\ (zero?{zero <- `zero?`} = ?(ZERO_zero)))) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec @@ -25726,7 +25734,7 @@ ;; ../../../../specification/wasm-latest/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))) + -- if ((((sz!`%`_sz.0 * M!`%`_M.0) : nat <:> rat) = (($vsize(vectype) : nat <:> rat) / (2 : nat <:> rat))) /\ (M!`%`_M.0 > 1)) | SPLAT(sz) | ZERO(sz : sz,) -- if (sz!`%`_sz.0 >= 32) @@ -26010,233 +26018,233 @@ ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec rec { -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:585.1-585.44 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:591.1-591.44 def $shift_labelidxs(labelidx*) : labelidx* - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:586.1-586.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:592.1-592.32 def $shift_labelidxs([]) = [] - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:587.1-587.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:593.1-593.66 def $shift_labelidxs{`labelidx'*` : labelidx*}([`%`_labelidx(0,)] ++ labelidx'*{labelidx' <- `labelidx'*`}) = $shift_labelidxs(labelidx'*{labelidx' <- `labelidx'*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:588.1-588.91 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:594.1-594.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-latest/1.3-syntax.instructions.spectec rec { -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:421.1-421.30 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:427.1-427.30 def $free_instr(instr : instr) : free - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:436.1-436.26 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:442.1-442.26 def $free_instr(NOP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:437.1-437.34 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:443.1-443.34 def $free_instr(UNREACHABLE_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:438.1-438.27 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:444.1-444.27 def $free_instr(DROP_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:439.1-439.86 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:445.1-445.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-latest/1.3-syntax.instructions.spectec:441.1-441.92 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:447.1-447.92 def $free_instr{blocktype : blocktype, `instr*` : instr*}(BLOCK_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:442.1-442.91 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:448.1-448.91 def $free_instr{blocktype : blocktype, `instr*` : instr*}(LOOP_instr(blocktype, instr*{instr <- `instr*`})) = $free_blocktype(blocktype) +++ $free_block(instr*{instr <- `instr*`}) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:443.1-444.79 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:449.1-450.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-latest/1.3-syntax.instructions.spectec:446.1-446.56 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:452.1-452.56 def $free_instr{labelidx : labelidx}(BR_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:447.1-447.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:453.1-453.59 def $free_instr{labelidx : labelidx}(BR_IF_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:448.1-449.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:454.1-455.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-latest/1.3-syntax.instructions.spectec:450.1-450.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:456.1-456.64 def $free_instr{labelidx : labelidx}(BR_ON_NULL_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:451.1-451.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:457.1-457.68 def $free_instr{labelidx : labelidx}(BR_ON_NON_NULL_instr(labelidx)) = $free_labelidx(labelidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:452.1-453.83 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:458.1-459.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-latest/1.3-syntax.instructions.spectec:454.1-455.83 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:460.1-461.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-latest/1.3-syntax.instructions.spectec:457.1-457.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:463.1-463.55 def $free_instr{funcidx : funcidx}(CALL_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:458.1-458.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:464.1-464.59 def $free_instr{typeuse : typeuse}(CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:459.1-460.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:465.1-466.53 def $free_instr{tableidx : tableidx, typeuse : typeuse}(CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:461.1-461.29 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:467.1-467.29 def $free_instr(RETURN_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:462.1-462.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:468.1-468.62 def $free_instr{funcidx : funcidx}(RETURN_CALL_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:463.1-463.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:469.1-469.66 def $free_instr{typeuse : typeuse}(RETURN_CALL_REF_instr(typeuse)) = $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:464.1-465.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:470.1-471.53 def $free_instr{tableidx : tableidx, typeuse : typeuse}(RETURN_CALL_INDIRECT_instr(tableidx, typeuse)) = $free_tableidx(tableidx) +++ $free_typeuse(typeuse) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:467.1-467.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:473.1-473.53 def $free_instr{tagidx : tagidx}(THROW_instr(tagidx)) = $free_tagidx(tagidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:468.1-468.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:474.1-474.32 def $free_instr(THROW_REF_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:469.1-470.87 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:475.1-476.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-latest/1.3-syntax.instructions.spectec:472.1-472.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:478.1-478.63 def $free_instr{numtype : numtype, numlit : num_(numtype)}(CONST_instr(numtype, numlit)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:473.1-473.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:479.1-479.60 def $free_instr{numtype : numtype, unop : unop_(numtype)}(UNOP_instr(numtype, unop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:474.1-474.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:480.1-480.62 def $free_instr{numtype : numtype, binop : binop_(numtype)}(BINOP_instr(numtype, binop)) = $free_numtype(numtype) - ;; ../../../../specification/wasm-latest/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-latest/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-latest/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-latest/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-latest/1.3-syntax.instructions.spectec:481.1-481.64 + def $free_instr{numtype : numtype, testop : testop_(numtype)}(TESTOP_instr(numtype, testop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:482.1-482.62 + def $free_instr{numtype : numtype, relop : relop_(numtype)}(RELOP_instr(numtype, relop)) = $free_numtype(numtype) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:483.1-484.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-latest/1.3-syntax.instructions.spectec:486.1-486.64 + def $free_instr{vectype : vectype, veclit : vec_(vectype)}(VCONST_instr(vectype, veclit)) = $free_vectype(vectype) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:487.1-487.64 def $free_instr{vectype : vectype, vvunop : vvunop}(VVUNOP_instr(vectype, vvunop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:482.1-482.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:488.1-488.66 def $free_instr{vectype : vectype, vvbinop : vvbinop}(VVBINOP_instr(vectype, vvbinop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:483.1-483.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:489.1-489.68 def $free_instr{vectype : vectype, vvternop : vvternop}(VVTERNOP_instr(vectype, vvternop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:484.1-484.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:490.1-490.68 def $free_instr{vectype : vectype, vvtestop : vvtestop}(VVTESTOP_instr(vectype, vvtestop)) = $free_vectype(vectype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:485.1-485.56 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:491.1-491.56 def $free_instr{shape : shape, vunop : vunop_(shape)}(VUNOP_instr(shape, vunop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:486.1-486.58 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:492.1-492.58 def $free_instr{shape : shape, vbinop : vbinop_(shape)}(VBINOP_instr(shape, vbinop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:487.1-487.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:493.1-493.60 def $free_instr{shape : shape, vternop : vternop_(shape)}(VTERNOP_instr(shape, vternop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:488.1-488.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:494.1-494.60 def $free_instr{shape : shape, vtestop : vtestop_(shape)}(VTESTOP_instr(shape, vtestop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:489.1-489.58 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:495.1-495.58 def $free_instr{shape : shape, vrelop : vrelop_(shape)}(VRELOP_instr(shape, vrelop)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:490.1-490.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:496.1-496.64 def $free_instr{ishape : ishape, vshiftop : vshiftop_(ishape)}(VSHIFTOP_instr(ishape, vshiftop)) = $free_shape(ishape!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:491.1-491.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:497.1-497.55 def $free_instr{ishape : ishape}(VBITMASK_instr(ishape)) = $free_shape(ishape!`%`_ishape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:492.1-492.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:498.1-498.66 def $free_instr{bshape : bshape, vswizzlop : vswizzlop_(bshape)}(VSWIZZLOP_instr(bshape, vswizzlop)) = $free_shape(bshape!`%`_bshape.0) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:493.1-493.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:499.1-499.64 def $free_instr{bshape : bshape, `laneidx*` : laneidx*}(VSHUFFLE_instr(bshape, laneidx*{laneidx <- `laneidx*`})) = $free_shape(bshape!`%`_bshape.0) - ;; ../../../../specification/wasm-latest/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-latest/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-latest/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-latest/1.3-syntax.instructions.spectec:500.1-501.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-latest/1.3-syntax.instructions.spectec:502.1-503.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-latest/1.3-syntax.instructions.spectec:504.1-505.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-latest/1.3-syntax.instructions.spectec:506.1-507.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-latest/1.3-syntax.instructions.spectec:502.1-503.47 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:508.1-509.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-latest/1.3-syntax.instructions.spectec:504.1-504.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:510.1-510.51 def $free_instr{shape : shape}(VSPLAT_instr(shape)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:505.1-505.70 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:511.1-511.70 def $free_instr{shape : shape, `sx?` : sx?, laneidx : laneidx}(VEXTRACT_LANE_instr(shape, sx?{sx <- `sx?`}, laneidx)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:506.1-506.66 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:512.1-512.66 def $free_instr{shape : shape, laneidx : laneidx}(VREPLACE_LANE_instr(shape, laneidx)) = $free_shape(shape) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:508.1-508.62 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:514.1-514.62 def $free_instr{heaptype : heaptype}(`REF.NULL`_instr(heaptype)) = $free_heaptype(heaptype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:509.1-509.34 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:515.1-515.34 def $free_instr(`REF.IS_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:510.1-510.38 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:516.1-516.38 def $free_instr(`REF.AS_NON_NULL`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:511.1-511.29 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:517.1-517.29 def $free_instr(`REF.EQ`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:512.1-512.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:518.1-518.59 def $free_instr{reftype : reftype}(`REF.TEST`_instr(reftype)) = $free_reftype(reftype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:513.1-513.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:519.1-519.59 def $free_instr{reftype : reftype}(`REF.CAST`_instr(reftype)) = $free_reftype(reftype) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:514.1-514.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:520.1-520.59 def $free_instr{funcidx : funcidx}(`REF.FUNC`_instr(funcidx)) = $free_funcidx(funcidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:515.1-515.30 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:521.1-521.30 def $free_instr(`REF.I31`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:517.1-517.33 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:523.1-523.33 def $free_instr{sx : sx}(`I31.GET`_instr(sx)) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:519.1-519.61 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:525.1-525.61 def $free_instr{typeidx : typeidx}(`STRUCT.NEW`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:520.1-520.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:526.1-526.69 def $free_instr{typeidx : typeidx}(`STRUCT.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:521.1-521.69 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:527.1-527.69 def $free_instr{`sx?` : sx?, typeidx : typeidx, u32 : u32}(`STRUCT.GET`_instr(sx?{sx <- `sx?`}, typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:522.1-522.65 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:528.1-528.65 def $free_instr{typeidx : typeidx, u32 : u32}(`STRUCT.SET`_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:524.1-524.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:530.1-530.60 def $free_instr{typeidx : typeidx}(`ARRAY.NEW`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:525.1-525.68 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:531.1-531.68 def $free_instr{typeidx : typeidx}(`ARRAY.NEW_DEFAULT`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:526.1-526.70 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:532.1-532.70 def $free_instr{typeidx : typeidx, u32 : u32}(`ARRAY.NEW_FIXED`_instr(typeidx, u32)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:527.1-528.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:533.1-534.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(`ARRAY.NEW_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:529.1-530.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:535.1-536.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(`ARRAY.NEW_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:531.1-531.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:537.1-537.64 def $free_instr{`sx?` : sx?, typeidx : typeidx}(`ARRAY.GET`_instr(sx?{sx <- `sx?`}, typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:532.1-532.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:538.1-538.60 def $free_instr{typeidx : typeidx}(`ARRAY.SET`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:533.1-533.32 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:539.1-539.32 def $free_instr(`ARRAY.LEN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:534.1-534.61 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:540.1-540.61 def $free_instr{typeidx : typeidx}(`ARRAY.FILL`_instr(typeidx)) = $free_typeidx(typeidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:535.1-536.55 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:541.1-542.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-latest/1.3-syntax.instructions.spectec:537.1-538.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:543.1-544.51 def $free_instr{typeidx : typeidx, dataidx : dataidx}(`ARRAY.INIT_DATA`_instr(typeidx, dataidx)) = $free_typeidx(typeidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:539.1-540.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:545.1-546.51 def $free_instr{typeidx : typeidx, elemidx : elemidx}(`ARRAY.INIT_ELEM`_instr(typeidx, elemidx)) = $free_typeidx(typeidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:542.1-542.41 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:548.1-548.41 def $free_instr(`EXTERN.CONVERT_ANY`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:543.1-543.41 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:549.1-549.41 def $free_instr(`ANY.CONVERT_EXTERN`_instr) = {TYPES [], FUNCS [], GLOBALS [], TABLES [], MEMS [], ELEMS [], DATAS [], LOCALS [], LABELS [], TAGS []} - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:545.1-545.63 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:551.1-551.63 def $free_instr{localidx : localidx}(`LOCAL.GET`_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:546.1-546.63 - def $free_instr{localidx : localidx}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:547.1-547.63 - def $free_instr{localidx : localidx}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:549.1-549.67 - def $free_instr{globalidx : globalidx}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:550.1-550.67 - def $free_instr{globalidx : globalidx}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:552.1-552.63 - def $free_instr{tableidx : tableidx}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + def $free_instr{localidx : localidx}(`LOCAL.SET`_instr(localidx)) = $free_localidx(localidx) ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:553.1-553.63 + def $free_instr{localidx : localidx}(`LOCAL.TEE`_instr(localidx)) = $free_localidx(localidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:555.1-555.67 + def $free_instr{globalidx : globalidx}(`GLOBAL.GET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:556.1-556.67 + def $free_instr{globalidx : globalidx}(`GLOBAL.SET`_instr(globalidx)) = $free_globalidx(globalidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:558.1-558.63 + def $free_instr{tableidx : tableidx}(`TABLE.GET`_instr(tableidx)) = $free_tableidx(tableidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:559.1-559.63 def $free_instr{tableidx : tableidx}(`TABLE.SET`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:554.1-554.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:560.1-560.64 def $free_instr{tableidx : tableidx}(`TABLE.SIZE`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:555.1-555.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:561.1-561.64 def $free_instr{tableidx : tableidx}(`TABLE.GROW`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:556.1-556.64 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:562.1-562.64 def $free_instr{tableidx : tableidx}(`TABLE.FILL`_instr(tableidx)) = $free_tableidx(tableidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:557.1-558.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:563.1-564.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-latest/1.3-syntax.instructions.spectec:559.1-560.53 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:565.1-566.53 def $free_instr{tableidx : tableidx, elemidx : elemidx}(`TABLE.INIT`_instr(tableidx, elemidx)) = $free_tableidx(tableidx) +++ $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:561.1-561.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:567.1-567.60 def $free_instr{elemidx : elemidx}(`ELEM.DROP`_instr(elemidx)) = $free_elemidx(elemidx) - ;; ../../../../specification/wasm-latest/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-latest/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-latest/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-latest/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) + 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-latest/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) + 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-latest/1.3-syntax.instructions.spectec:573.1-574.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-latest/1.3-syntax.instructions.spectec:575.1-576.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-latest/1.3-syntax.instructions.spectec:577.1-578.49 + def $free_instr{vectype : vectype, memidx : memidx, memarg : memarg}(VSTORE_instr(vectype, memidx, memarg)) = $free_vectype(vectype) +++ $free_memidx(memidx) + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:579.1-580.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-latest/1.3-syntax.instructions.spectec:575.1-575.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:581.1-581.59 def $free_instr{memidx : memidx}(`MEMORY.SIZE`_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:576.1-576.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:582.1-582.59 def $free_instr{memidx : memidx}(`MEMORY.GROW`_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:577.1-577.59 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:583.1-583.59 def $free_instr{memidx : memidx}(`MEMORY.FILL`_instr(memidx)) = $free_memidx(memidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:578.1-579.51 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:584.1-585.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-latest/1.3-syntax.instructions.spectec:580.1-581.49 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:586.1-587.49 def $free_instr{memidx : memidx, dataidx : dataidx}(`MEMORY.INIT`_instr(memidx, dataidx)) = $free_memidx(memidx) +++ $free_dataidx(dataidx) - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:582.1-582.60 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:588.1-588.60 def $free_instr{dataidx : dataidx}(`DATA.DROP`_instr(dataidx)) = $free_dataidx(dataidx) -;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:422.1-422.31 +;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:428.1-428.31 def $free_block(instr*) : free - ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:590.1-591.47 + ;; ../../../../specification/wasm-latest/1.3-syntax.instructions.spectec:596.1-597.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*`})) } @@ -28741,7 +28749,9 @@ ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec def $lpacknum_(lanetype : lanetype, num_ : num_($lunpack(lanetype))) : lane_(lanetype) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $lpacknum_{numtype : numtype, c : num_($lunpack((numtype : numtype <: lanetype)))}((numtype : numtype <: lanetype), c) = c + def $lpacknum_{Inn : Inn, c : num_($lunpack((Inn : Inn <: lanetype)))}((Inn : Inn <: lanetype), c) = c + ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec + def $lpacknum_{Fnn : Fnn, c : num_($lunpack((Fnn : Fnn <: lanetype)))}((Fnn : Fnn <: lanetype), c) = c ;; ../../../../specification/wasm-latest/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) @@ -28755,7 +28765,9 @@ ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec def $lunpacknum_(lanetype : lanetype, lane_ : lane_(lanetype)) : num_($lunpack(lanetype)) ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec - def $lunpacknum_{numtype : numtype, c : lane_((numtype : numtype <: lanetype))}((numtype : numtype <: lanetype), c) = c + def $lunpacknum_{Inn : Inn, c : lane_((Inn : Inn <: lanetype))}((Inn : Inn <: lanetype), c) = c + ;; ../../../../specification/wasm-latest/3.1-numerics.scalar.spectec + def $lunpacknum_{Fnn : Fnn, c : lane_((Fnn : Fnn <: lanetype))}((Fnn : Fnn <: lanetype), c) = c ;; ../../../../specification/wasm-latest/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) @@ -28900,9 +28912,9 @@ ;; ../../../../specification/wasm-latest/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-latest/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?`} + def $zeroop{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: lanetype), M_2), TRUNC_SAT_vcvtop__(sx, zero?{zero <- `zero?`})) = zero?{zero <- `zero?`} ;; ../../../../specification/wasm-latest/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?`} + def $zeroop{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: lanetype), M_2), RELAXED_TRUNC_vcvtop__(sx, zero?{zero <- `zero?`})) = zero?{zero <- `zero?`} ;; ../../../../specification/wasm-latest/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-latest/3.2-numerics.vector.spectec @@ -28915,9 +28927,9 @@ ;; ../../../../specification/wasm-latest/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-latest/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?`})) = ?() + def $halfop{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: lanetype), M_2), TRUNC_SAT_vcvtop__(sx, zero?{zero <- `zero?`})) = ?() ;; ../../../../specification/wasm-latest/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?`})) = ?() + def $halfop{Fnn_1 : Fnn, M_1 : M, Inn_2 : Inn, M_2 : M, sx : sx, `zero?` : zero?}(`%X%`_shape((Fnn_1 : Fnn <: lanetype), M_1), `%X%`_shape((Inn_2 : Inn <: lanetype), M_2), RELAXED_TRUNC_vcvtop__(sx, zero?{zero <- `zero?`})) = ?() ;; ../../../../specification/wasm-latest/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-latest/3.2-numerics.vector.spectec @@ -28952,11 +28964,12 @@ -- otherwise ;; ../../../../specification/wasm-latest/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)* +def $ivunop_(shape : shape, def $f_(N : N, iN : iN(N)) : iN(N), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)*? ;; ../../../../specification/wasm-latest/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*`})] + 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*`}) + def $ivunop_{x0 : shape, x2 : vec_(V128_Vnn)}(x0, def $f_, x2) = ?() ;; ../../../../specification/wasm-latest/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)* @@ -28966,20 +28979,22 @@ -- 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-latest/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)* +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-latest/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*`})] + 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*`}) + def $ivbinop_{x0 : shape, x2 : vec_(V128_Vnn), x3 : vec_(V128_Vnn)}(x0, def $f_, x2, x3) = ?() ;; ../../../../specification/wasm-latest/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)* +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-latest/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*`})] + 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*`}) + def $ivbinopsx_{x0 : shape, x2 : sx, x3 : vec_(V128_Vnn), x4 : vec_(V128_Vnn)}(x0, def $f_, x2, x3, x4) = ?() ;; ../../../../specification/wasm-latest/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)* @@ -29041,18 +29056,20 @@ -- if ($isize(Inn) = $fsize(Fnn)) ;; ../../../../specification/wasm-latest/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) +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-latest/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*`}) + 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*`}) + def $ivshiftop_{x0 : shape, x2 : vec_(V128_Vnn), x3 : u32}(x0, def $f_, x2, x3) = ?() ;; ../../../../specification/wasm-latest/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) +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-latest/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*`}) + 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*`}) + def $ivshiftopsx_{x0 : shape, x2 : sx, x3 : vec_(V128_Vnn), x4 : u32}(x0, def $f_, x2, x3, x4) = ?() ;; ../../../../specification/wasm-latest/3.2-numerics.vector.spectec def $ivbitmaskop_(shape : shape, vec_ : vec_(V128_Vnn)) : u32 @@ -29062,20 +29079,22 @@ -- 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-latest/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) +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-latest/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*`}) + 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*`}) + def $ivswizzlop_{x0 : shape, x2 : vec_(V128_Vnn), x3 : vec_(V128_Vnn)}(x0, def $f_, x2, x3) = ?() ;; ../../../../specification/wasm-latest/3.2-numerics.vector.spectec -def $ivshufflop_(shape : shape, laneidx*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) +def $ivshufflop_(shape : shape, laneidx*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)? ;; ../../../../specification/wasm-latest/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*`}) + 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*`}) + def $ivshufflop_{x0 : shape, x1 : laneidx*, x2 : vec_(V128_Vnn), x3 : vec_(V128_Vnn)}(x0, x1, x2, x3) = ?() ;; ../../../../specification/wasm-latest/3.2-numerics.vector.spectec def $vvunop_(vectype : vectype, vvunop : vvunop, vec_ : vec_(vectype)) : vec_(vectype)* @@ -29115,32 +29134,32 @@ ;; ../../../../specification/wasm-latest/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-latest/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) + 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-latest/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) + 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-latest/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) + 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-latest/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-latest/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) + 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-latest/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) + 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-latest/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) + 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-latest/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) + 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-latest/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) + 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-latest/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) + 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-latest/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) + 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-latest/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) + 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-latest/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) + 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-latest/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-latest/3.2-numerics.vector.spectec @@ -29245,9 +29264,9 @@ ;; ../../../../specification/wasm-latest/3.2-numerics.vector.spectec def $vshiftop_(ishape : ishape, vshiftop_ : vshiftop_(ishape), vec_ : vec_(V128_Vnn), u32 : u32) : vec_(V128_Vnn) ;; ../../../../specification/wasm-latest/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))),)) + 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-latest/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))),)) + 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-latest/3.2-numerics.vector.spectec def $vbitmaskop_(ishape : ishape, vec_ : vec_(V128_Vnn)) : u32 @@ -29257,14 +29276,15 @@ ;; ../../../../specification/wasm-latest/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-latest/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) + 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-latest/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) + 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-latest/3.2-numerics.vector.spectec -def $vshufflop_(bshape : bshape, laneidx*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn) +def $vshufflop_(bshape : bshape, laneidx*, vec_ : vec_(V128_Vnn), vec_ : vec_(V128_Vnn)) : vec_(V128_Vnn)? ;; ../../../../specification/wasm-latest/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) + 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))) + def $vshufflop_{x0 : bshape, x1 : laneidx*, x2 : vec_(V128_Vnn), x3 : vec_(V128_Vnn)}(x0, x1, x2, x3) = ?() ;; ../../../../specification/wasm-latest/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) @@ -30279,7 +30299,8 @@ ;; ../../../../specification/wasm-latest/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)) + -- if ($vshufflop_(sh, i*{i <- `i*`}, c_1, c_2) =/= ?()) + -- if (c = !($vshufflop_(sh, i*{i <- `i*`}, c_1, c_2))) ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec rule vsplat{Lnn : Lnn, c_1 : num_($lunpack(Lnn)), M : M, c : vec_(V128_Vnn)}: @@ -30290,7 +30311,7 @@ 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 (i!`%`_laneidx.0 < |$lanes_(`%X%`_shape((nt : numtype <: lanetype), M), c_1)|) - -- if (c_2 = $lanes_(`%X%`_shape((nt : numtype <: lanetype), M), c_1)[i!`%`_laneidx.0]) + -- if (c_2 = $lunpacknum_((nt : numtype <: lanetype), $lanes_(`%X%`_shape((nt : numtype <: lanetype), M), c_1)[i!`%`_laneidx.0])) ;; ../../../../specification/wasm-latest/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)}: @@ -30633,7 +30654,7 @@ ;; ../../../../specification/wasm-latest/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)]) + `%~>%`(`%;%`_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_($iadd_($size((at : addrtype <: numtype)), `%`_iN(i!`%`_num_.0,), `%`_iN(1,))!`%`_iN.0,)) (val : val <: instr) CONST_instr((at : addrtype <: numtype), `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `MEMORY.FILL`_instr(x)]) -- otherwise ;; ../../../../specification/wasm-latest/4.3-execution.instructions.spectec @@ -30649,7 +30670,7 @@ ;; ../../../../specification/wasm-latest/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)]) + `%~>%`(`%;%`_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_($iadd_($size((at_1 : addrtype <: numtype)), `%`_iN(i_1!`%`_num_.0,), `%`_iN(1,))!`%`_iN.0,)) CONST_instr((at_2 : addrtype <: numtype), `%`_num_($iadd_($size((at_2 : addrtype <: numtype)), `%`_iN(i_2!`%`_num_.0,), `%`_iN(1,))!`%`_iN.0,)) 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) @@ -30671,7 +30692,7 @@ ;; ../../../../specification/wasm-latest/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)]) + `%~>%`(`%;%`_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_($iadd_($size((at : addrtype <: numtype)), `%`_iN(i!`%`_num_.0,), `%`_iN(1,))!`%`_iN.0,)) CONST_instr(I32_numtype, $iadd_(32, j, `%`_iN(1,))) CONST_instr(I32_numtype, `%`_num_((((n : nat <:> int) - (1 : nat <:> int)) : int <:> nat),)) `MEMORY.INIT`_instr(x, y)]) -- if (j!`%`_num_.0 < |$data(z, y).BYTES_datainst|) -- otherwise @@ -31693,6 +31714,7 @@ ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec rule _{s : store, `b*` : byte*}: `%|-%:%`(s, {BYTES b*{b <- `b*`}}, OK_datatype) + -- if (|b*{b <- `b*`}| < (2 ^ 32)) ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec relation Eleminst_ok: `%|-%:%`(store, eleminst, elemtype) @@ -31701,6 +31723,7 @@ `%|-%:%`(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*`} + -- if (|ref*{ref <- `ref*`}| < (2 ^ 32)) ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec relation Exportinst_ok: `%|-%:OK`(store, exportinst) @@ -31782,37 +31805,36 @@ -- 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-latest/7.1-soundness.configurations.spectec:37.1-42.35 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:37.1-41.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*`},)) + -- Expr_ok2: `%;%|-%:%`(s, C' +++ {TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(`%`_resulttype(t^n{t <- `t*`},)), REFS [], RECS []}, 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-latest/7.1-soundness.configurations.spectec:44.1-47.49 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:43.1-46.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-latest/7.1-soundness.configurations.spectec:49.1-51.42 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:48.1-50.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-latest/7.1-soundness.configurations.spectec:5.1-6.36 relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:54.1-55.27 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:53.1-54.27 rule empty{s : store, C : context}: `%;%|-%:%`(s, C, [], `%->_%%`_instrtype(`%`_resulttype([],), [], `%`_resulttype([],))) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:57.1-59.50 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:56.1-58.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-latest/7.1-soundness.configurations.spectec:61.1-65.86 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:60.1-64.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*`},))) @@ -31822,14 +31844,14 @@ -- (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-latest/7.1-soundness.configurations.spectec:67.1-71.33 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:66.1-70.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-latest/7.1-soundness.configurations.spectec:74.1-77.33 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:73.1-76.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*`},))) @@ -31837,7 +31859,7 @@ ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:7.1-8.36 relation Expr_ok2: `%;%|-%:%`(store, context, expr, resulttype) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:80.1-82.44 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:79.1-81.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*`},))) @@ -31916,15 +31938,15 @@ ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec rec { -;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:230.1-231.50 +;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:231.1-232.50 relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:244.1-247.35 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:245.1-248.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-latest/7.1-soundness.configurations.spectec:249.1-252.20 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:250.1-253.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|) @@ -31933,20 +31955,20 @@ -- if (i < |ft*{ft <- `ft*`}|) -- if (ft*{ft <- `ft*`}[i] = `%%`_fieldtype(?(), zt)) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:254.1-256.42 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:255.1-257.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))) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:258.1-259.44 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:259.1-260.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|) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:261.1-262.28 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:262.1-263.28 rule `ref.extern`{ref : ref, s : store}: `%>>_%%`(`REF.EXTERN`_fieldval(ref), s, (ref : ref <: fieldval)) }
diff --git a/spectec/test-prose/TEST.md b/spectec/test-prose/TEST.md index b209320..f9180a4 100644 --- a/spectec/test-prose/TEST.md +++ b/spectec/test-prose/TEST.md
@@ -15,6 +15,7 @@ == IL Validation after pass sideconditions... == Translating to AL... == Prose Generation... +../../../../specification/wasm-1.0/B-soundness.spectec:121.8-121.45: prem_to_instrs: Yet `Externaddr_ok: `%|-%:%`(s, FUNC_externaddr(fa), FUNC_externtype(ft))` @@ -395,16 +396,7 @@ -The instruction :math:`({\mathit{nt}}_1 {.} {{\mathit{cvtop}}}{\mathsf{\_}}{{\mathit{nt}}_2})` is :ref:`valid <valid-val>` with the function type :math:`{\mathit{nt}}_2~\rightarrow~{\mathit{nt}}_1` if: - - - * Either: - - * :math:`{\mathit{cvtop}}` is of the form :math:`\mathsf{reinterpret}`. - - * :math:`{|{\mathit{nt}}_1|}` is of the form :math:`{|{\mathit{nt}}_2|}`. - - * Or: +The instruction :math:`({\mathit{nt}}_1 {.} {{\mathit{cvtop}}}{\mathsf{\_}}{{\mathit{nt}}_2})` is :ref:`valid <valid-val>` with the function type :math:`{\mathit{nt}}_2~\rightarrow~{\mathit{nt}}_1`. @@ -517,19 +509,6 @@ -The instruction :math:`({\mathit{nt}}_1 {.} {\mathsf{reinterpret}}{\mathsf{\_}}{{\mathit{nt}}_2})` is :ref:`valid <valid-val>` with the function type :math:`{\mathit{nt}}_2~\rightarrow~{\mathit{nt}}_1` if: - - - * :math:`{|{\mathit{nt}}_1|}` is of the form :math:`{|{\mathit{nt}}_2|}`. - - - - -The instruction :math:`({\mathit{nt}}_1 {.} {{\mathit{cvtop}}}{\mathsf{\_}}{{\mathit{nt}}_2})` is :ref:`valid <valid-val>` with the function type :math:`{\mathit{nt}}_2~\rightarrow~{\mathit{nt}}_1`. - - - - The instruction :math:`(\mathsf{load}~t~{\mathit{memarg}})` is :ref:`valid <valid-val>` with the function type :math:`\mathsf{i{\scriptstyle 32}}~\rightarrow~t` if: @@ -1037,6 +1016,399 @@ * The external type :math:`{\mathit{xt}'}` :ref:`matches <match>` the external type :math:`{\mathit{xt}}`. + + +The context :math:`C` is :ref:`valid <valid-val>` 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 <valid-val>`. + + * For all :math:`{\mathit{gt}}` in :math:`{{\mathit{gt}}^\ast}`: + + * The global type :math:`{\mathit{gt}}` is :ref:`valid <valid-val>`. + + * For all :math:`{\mathit{mt}}` in :math:`{{\mathit{mt}}^\ast}`: + + * The memory type :math:`{\mathit{mt}}` is :ref:`valid <valid-val>`. + + * For all :math:`{\mathit{tt}}` in :math:`{{\mathit{tt}}^\ast}`: + + * The table type :math:`{\mathit{tt}}` is :ref:`valid <valid-val>`. + + * For all :math:`{\mathit{ft}}_2` in :math:`{{\mathit{ft}}_2^\ast}`: + + * The function type :math:`{\mathit{ft}}_2` is :ref:`valid <valid-val>`. + + + + +The value :math:`(t{.}\mathsf{const}~c_t)` is :ref:`valid <valid-val>` with the number type :math:`t`. + + + + +The result :math:`{\mathit{result}}` is :ref:`valid <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` with the number type :math:`t`. + + + + +The result :math:`\mathsf{trap}` is :ref:`valid <valid-val>` with the number type sequence :math:`{t^\ast}`. + + + + +The export instance :math:`\{ \mathsf{name}~{\mathit{nm}},\;\allowbreak \mathsf{addr}~{\mathit{xa}} \}` is :ref:`valid <valid-val>` if: + + + * The external value :math:`{\mathit{xa}}` is :ref:`valid <valid-val>` 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 <valid-val>` 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 <valid-val>`. + + * 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>`. + + * :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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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}}'}`. + + * :math:`{{\mathit{instr}}'}` is valid with :math:`{{\mathit{valtype}}^\ast}~\rightarrow~{{\mathit{valtype}'}^\ast}`. + * Or: + + * The administrative instruction sequence :math:`{{\mathit{instr}}^\ast}` is of the form :math:`{{{\mathit{instr}}}_1^\ast}~{{{\mathit{instr}}}_2^\ast}`. + + * :math:`{{{\mathit{instr}}}_1^\ast}` 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}}` is valid with :math:`{t_1^\ast}~\rightarrow~{t_2^\ast}` if: + + + * :math:`{\mathit{instr}}` is valid with :math:`{t_1^\ast}~\rightarrow~{t_2^\ast}`. + + + + +:math:`{{{\mathit{instr}}}_1^\ast}~{{{\mathit{instr}}}_2^\ast}` is valid with :math:`{t_1^\ast}~\rightarrow~{t_3^\ast}` if: + + + * :math:`{{{\mathit{instr}}}_1^\ast}` 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 <valid-val>` with the global type :math:`({\mathit{mut}}~t)` if: + + + * The global type :math:`({\mathit{mut}}~t)` is :ref:`valid <valid-val>`. + + * The value :math:`{\mathit{val}}` is :ref:`valid <valid-val>` with the number type :math:`t`. + + + + +The memory instance :math:`\{ \mathsf{type}~{}[ n .. {m^?} ],\;\allowbreak \mathsf{bytes}~{b^\ast} \}` is :ref:`valid <valid-val>` with the memory type :math:`{}[ n .. {m^?} ]` if: + + + * The memory type :math:`{}[ n .. {m^?} ]` is :ref:`valid <valid-val>`. + + * 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 <valid-val>` with the table type :math:`{}[ n .. {m^?} ]` if: + + + * The table type :math:`{}[ n .. {m^?} ]` is :ref:`valid <valid-val>`. + + * 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 <valid-val>` with the function type :math:`{\mathit{ft}}` if: + + + * The function type :math:`{\mathit{ft}}` is :ref:`valid <valid-val>`. + + * The module instance :math:`{\mathit{moduleinst}}` is :ref:`valid <valid-val>` with the context :math:`C`. + + * The function :math:`{\mathit{func}}` is :ref:`valid <valid-val>` with the function type :math:`{\mathit{ft}}`. + + + + +The store :math:`s` is :ref:`valid <valid-val>` if: + + + * For all : + + * The global instance :math:`{\mathit{globalinst}}` is :ref:`valid <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` with the context :math:`C` if: + + + * The store :math:`s` is :ref:`valid <valid-val>`. + + * The frame :math:`f` is :ref:`valid <valid-val>` with the context :math:`C`. + + + + +The configuration :math:`(s, f)~;~{{\mathit{instr}}^\ast}` is :ref:`valid <valid-val>` with the result type :math:`{t^?}` if: + + + * The state :math:`(s, f)` is :ref:`valid <valid-val>` with the context :math:`C`. + + * :math:`{{\mathit{instr}}^\ast}` is valid with :math:`{t^?}`. + + :math:`\mathsf{load}~t~{\mathit{ao}}` ..................................... @@ -3225,6 +3597,7 @@ == IL Validation after pass sideconditions... == Translating to AL... == Prose Generation... +../../../../specification/wasm-1.0/B-soundness.spectec:121.8-121.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. @@ -3423,12 +3796,7 @@ - the instruction (RELOP t relop_t) is valid with the function type [t, t] -> [I32]. Instr_ok/cvtop -- the instruction (CVTOP nt_1 nt_2 cvtop) is valid with the function type [nt_2] -> [nt_1] if: - - Either: - - cvtop is REINTERPRET. - - $size(nt_1) is $size(nt_2). - - Or: - +- the instruction (CVTOP nt_1 nt_2 cvtop) is valid with the function type [nt_2] -> [nt_1]. Instr_ok/local.get - the instruction (LOCAL.GET x) is valid with the function type [] -> [t] if: @@ -3485,13 +3853,6 @@ - t' is Inn. - (2 ^ memarg.ALIGN) is less than or equal to (M / 8). -Instr_ok/cvtop-reinterpret -- the instruction (CVTOP nt_1 nt_2 REINTERPRET) is valid with the function type [nt_2] -> [nt_1] if: - - $size(nt_1) is $size(nt_2). - -Instr_ok/cvtop-convert -- the instruction (CVTOP nt_1 nt_2 cvtop) is valid with [nt_2] -> [nt_1]. - Instr_ok/load-val - the instruction (LOAD t ?() memarg) is valid with the function type [I32] -> [t] if: - (2 ^ memarg.ALIGN) is less than or equal to ($size(t) / 8). @@ -3751,6 +4112,207 @@ - 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']. + - admininstr' is valid with valtype* -> valtype'*. + - 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/instr +- [admininstr] is valid with t_1* -> t_2* if: + - admininstr is valid with t_1* -> t_2*. + +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) ; admininstr* 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. @@ -4360,29 +4922,29 @@ 8. Assert: Due to validation, (relop_ = GE). 9. Return $fge_($size(valtype), iN_1, iN_2). -cvtop__ valtype valtype' cvtop iN -1. If cvtop is some EXTEND, then: - a. Let (EXTEND sx) be cvtop. +cvtop__ valtype valtype' cvtop__ iN +1. If cvtop__ is some EXTEND, then: + a. Let (EXTEND sx) be cvtop__. b. If ((valtype = I32) /\ (valtype' = I64)), then: 1) Return [$extend__(32, 64, sx, iN)]. -2. If ((valtype = I64) /\ ((valtype' = I32) /\ (cvtop = WRAP))), then: +2. If ((valtype = I64) /\ ((valtype' = I32) /\ (cvtop__ = WRAP))), then: a. Return [$wrap__(64, 32, iN)]. -3. If (valtype is Fnn /\ (valtype' is Inn /\ cvtop is some TRUNC)), then: - a. Let (TRUNC sx) be cvtop. +3. If (valtype is Fnn /\ (valtype' is Inn /\ cvtop__ is some TRUNC)), then: + a. Let (TRUNC sx) be cvtop__. b. Return $list_(`val_((Inn : Inn <: valtype)), $trunc__($size(valtype), $size(valtype'), sx, iN)). -4. If ((valtype = F32) /\ ((valtype' = F64) /\ (cvtop = PROMOTE))), then: +4. If ((valtype = F32) /\ ((valtype' = F64) /\ (cvtop__ = PROMOTE))), then: a. Return $promote__(32, 64, iN). -5. If ((valtype = F64) /\ ((valtype' = F32) /\ (cvtop = DEMOTE))), then: +5. If ((valtype = F64) /\ ((valtype' = F32) /\ (cvtop__ = DEMOTE))), then: a. Return $demote__(64, 32, iN). 6. If (valtype is Inn /\ valtype' is Fnn), then: - a. If cvtop is some CONVERT, then: - 1) Let (CONVERT sx) be cvtop. + a. If cvtop__ is some CONVERT, then: + 1) Let (CONVERT sx) be cvtop__. 2) Return [$convert__($size(valtype), $size(valtype'), sx, iN)]. - b. If ((cvtop = REINTERPRET) /\ ($size(valtype) = $size(valtype'))), then: + b. If ((cvtop__ = REINTERPRET) /\ ($size(valtype) = $size(valtype'))), then: 1) Return [$reinterpret__(valtype, valtype', iN)]. 7. Assert: Due to validation, valtype is Fnn. 8. Assert: Due to validation, valtype' is Inn. -9. Assert: Due to validation, (cvtop = REINTERPRET). +9. Assert: Due to validation, (cvtop__ = REINTERPRET). 10. Assert: Due to validation, ($size(valtype') = $size(valtype)). 11. Return [$reinterpret__(valtype, valtype', iN)]. @@ -5247,16 +5809,7 @@ -The instruction :math:`({\mathit{nt}}_1 {.} {{\mathit{cvtop}}}{\mathsf{\_}}{{\mathit{nt}}_2})` is :ref:`valid <valid-val>` with the function type :math:`{\mathit{nt}}_2~\rightarrow~{\mathit{nt}}_1` if: - - - * Either: - - * :math:`{\mathit{cvtop}}` is of the form :math:`\mathsf{reinterpret}`. - - * :math:`{|{\mathit{nt}}_1|}` is of the form :math:`{|{\mathit{nt}}_2|}`. - - * Or: +The instruction :math:`({\mathit{nt}}_1 {.} {{\mathit{cvtop}}}{\mathsf{\_}}{{\mathit{nt}}_2})` is :ref:`valid <valid-val>` with the function type :math:`{\mathit{nt}}_2~\rightarrow~{\mathit{nt}}_1`. @@ -5692,19 +6245,6 @@ -The instruction :math:`({\mathit{nt}}_1 {.} {\mathsf{reinterpret}}{\mathsf{\_}}{{\mathit{nt}}_2})` is :ref:`valid <valid-val>` with the function type :math:`{\mathit{nt}}_2~\rightarrow~{\mathit{nt}}_1` if: - - - * :math:`{|{\mathit{nt}}_1|}` is of the form :math:`{|{\mathit{nt}}_2|}`. - - - - -The instruction :math:`({\mathit{nt}}_1 {.} {{\mathit{cvtop}}}{\mathsf{\_}}{{\mathit{nt}}_2})` is :ref:`valid <valid-val>` with the function type :math:`{\mathit{nt}}_2~\rightarrow~{\mathit{nt}}_1`. - - - - The instruction :math:`({\mathit{nt}}{.}\mathsf{load}~{\mathit{memarg}})` is :ref:`valid <valid-val>` with the function type :math:`\mathsf{i{\scriptstyle 32}}~\rightarrow~{\mathit{nt}}` if: @@ -6371,6 +6911,544 @@ * The external type :math:`{\mathit{xt}'}` :ref:`matches <match>` the external type :math:`{\mathit{xt}}`. + + +The context :math:`C` is :ref:`valid <valid-val>` 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 <valid-val>`. + + * For all :math:`{\mathit{gt}}` in :math:`{{\mathit{gt}}^\ast}`: + + * The global type :math:`{\mathit{gt}}` is :ref:`valid <valid-val>`. + + * For all :math:`{\mathit{mt}}` in :math:`{{\mathit{mt}}^\ast}`: + + * The memory type :math:`{\mathit{mt}}` is :ref:`valid <valid-val>`. + + * For all :math:`{\mathit{tt}}` in :math:`{{\mathit{tt}}^\ast}`: + + * The table type :math:`{\mathit{tt}}` is :ref:`valid <valid-val>`. + + * For all :math:`{\mathit{ft}}_2` in :math:`{{\mathit{ft}}_2^\ast}`: + + * The function type :math:`{\mathit{ft}}_2` is :ref:`valid <valid-val>`. + + + + +The reference :math:`{\mathit{ref}}` is :ref:`valid <valid-val>` 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 <valid-val>` 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 <valid-val>` with the reference type :math:`{\mathit{rt}}`. + + + + +The reference :math:`(\mathsf{ref{.}func\_addr}~a)` is :ref:`valid <valid-val>` with the reference type :math:`\mathsf{funcref}` if: + + + * The external value :math:`(\mathsf{func}~a)` is :ref:`valid <valid-val>` with the external type :math:`(\mathsf{func}~{\mathit{ext}})`. + + + + +The reference :math:`(\mathsf{ref{.}host\_addr}~a)` is :ref:`valid <valid-val>` with the reference type :math:`\mathsf{externref}`. + + + + +The value :math:`{\mathit{val}}` is :ref:`valid <valid-val>` 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 <valid-val>` with the reference type :math:`{\mathit{rt}}`. + + + + +The value :math:`({\mathit{nt}}{.}\mathsf{const}~c_t)` is :ref:`valid <valid-val>` with the value type :math:`{\mathit{nt}}`. + + + + +The value :math:`({\mathit{vt}}{.}\mathsf{const}~c_t)` is :ref:`valid <valid-val>` with the value type :math:`{\mathit{vt}}`. + + + + +The value :math:`r` is :ref:`valid <valid-val>` with the value type :math:`{\mathit{rt}}` if: + + + * The reference :math:`r` is :ref:`valid <valid-val>` with the reference type :math:`{\mathit{rt}}`. + + + + +The result :math:`{\mathit{result}}` is :ref:`valid <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` with the value type :math:`t`. + + + + +The result :math:`\mathsf{trap}` is :ref:`valid <valid-val>` with the value type sequence :math:`{t^\ast}`. + + + + +The data instance :math:`\{ \mathsf{bytes}~{b^\ast} \}` is :ref:`valid <valid-val>` with the data type :math:`\mathsf{ok}` if: + + + * The length of :math:`{b^\ast}` is less than :math:`{2^{32}}`. + + + + +The element instance :math:`\{ \mathsf{type}~{\mathit{rt}},\;\allowbreak \mathsf{refs}~{{\mathit{ref}}^\ast} \}` is :ref:`valid <valid-val>` 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 <valid-val>` with the reference type :math:`{\mathit{rt}}`. + + * The length of :math:`{{\mathit{ref}}^\ast}` is less than :math:`{2^{32}}`. + + + + +The export instance :math:`\{ \mathsf{name}~{\mathit{nm}},\;\allowbreak \mathsf{addr}~{\mathit{xa}} \}` is :ref:`valid <valid-val>` if: + + + * The external value :math:`{\mathit{xa}}` is :ref:`valid <valid-val>` 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 <valid-val>` 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 <valid-val>`. + + * 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>`. + + * 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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}}'}`. + + * :math:`{{\mathit{instr}}'}` is valid with :math:`{{\mathit{valtype}}^\ast}~\rightarrow~{{\mathit{valtype}'}^\ast}`. + * Or: + + * The administrative instruction sequence :math:`{{\mathit{instr}}^\ast}` is of the form :math:`{{{\mathit{instr}}}_1^\ast}~{{{\mathit{instr}}}_2^\ast}`. + + * :math:`{{{\mathit{instr}}}_1^\ast}` 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: + + * :math:`{{\mathit{instr}}^\ast}` is valid with :math:`{t_1^\ast}~\rightarrow~{t_2^\ast}`. + + * The result type :math:`{{\mathit{valtype}}^\ast}` :ref:`matches <match>` the result type :math:`{t_1^\ast}`. + + * The result type :math:`{t_2^\ast}` :ref:`matches <match>` 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}}` is valid with :math:`{t_1^\ast}~\rightarrow~{t_2^\ast}` if: + + + * :math:`{\mathit{instr}}` is valid with :math:`{t_1^\ast}~\rightarrow~{t_2^\ast}`. + + + + +:math:`{{{\mathit{instr}}}_1^\ast}~{{{\mathit{instr}}}_2^\ast}` is valid with :math:`{t_1^\ast}~\rightarrow~{t_3^\ast}` if: + + + * :math:`{{{\mathit{instr}}}_1^\ast}` 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 <match>` the result type :math:`{t_1^\ast}`. + + * The result type :math:`{t_2^\ast}` :ref:`matches <match>` 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 <valid-val>` with the global type :math:`({\mathit{mut}}~t)` if: + + + * The global type :math:`({\mathit{mut}}~t)` is :ref:`valid <valid-val>`. + + * The value :math:`{\mathit{val}}` is :ref:`valid <valid-val>` with the value type :math:`t`. + + + + +The memory instance :math:`\{ \mathsf{type}~{}[ n .. {m^?} ]~\mathsf{page},\;\allowbreak \mathsf{bytes}~{b^\ast} \}` is :ref:`valid <valid-val>` with the memory type :math:`{}[ n .. {m^?} ]~\mathsf{page}` if: + + + * The memory type :math:`{}[ n .. {m^?} ]~\mathsf{page}` is :ref:`valid <valid-val>`. + + * 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 <valid-val>` with the table type :math:`({}[ n .. {m^?} ]~{\mathit{rt}})` if: + + + * The table type :math:`({}[ n .. {m^?} ]~{\mathit{rt}})` is :ref:`valid <valid-val>`. + + * For all :math:`{\mathit{ref}}` in :math:`{{\mathit{ref}}^\ast}`: + + * The reference :math:`{\mathit{ref}}` is :ref:`valid <valid-val>` 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 <valid-val>` with the function type :math:`{\mathit{ft}}` if: + + + * The function type :math:`{\mathit{ft}}` is :ref:`valid <valid-val>`. + + * The module instance :math:`{\mathit{moduleinst}}` is :ref:`valid <valid-val>` with the context :math:`C`. + + * The function :math:`{\mathit{func}}` is :ref:`valid <valid-val>` with the function type :math:`{\mathit{ft}}`. + + + + +The store :math:`s` is :ref:`valid <valid-val>` if: + + + * For all : + + * The global instance :math:`{\mathit{globalinst}}` is :ref:`valid <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` 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 <valid-val>` with the context :math:`C` if: + + + * The store :math:`s` is :ref:`valid <valid-val>`. + + * The frame :math:`f` is :ref:`valid <valid-val>` with the context :math:`C`. + + + + +The configuration :math:`(s, f)~;~{{\mathit{instr}}^\ast}` is :ref:`valid <valid-val>` with the result type :math:`{t^\ast}` if: + + + * The state :math:`(s, f)` is :ref:`valid <valid-val>` with the context :math:`C`. + + * :math:`{{\mathit{instr}}^\ast}` is valid with :math:`{t^\ast}`. + + :math:`\mathsf{table{.}copy}~x~y` ................................. @@ -7186,7 +8264,7 @@ #. Assert: Due to validation, :math:`i < {|{{\mathrm{lanes}}}_{{{\mathit{lanetype}}}{\mathsf{x}}{N}}(c_1)|}`. - #. Let :math:`c_2` be :math:`{{\mathrm{lanes}}}_{{{\mathit{lanetype}}}{\mathsf{x}}{N}}(c_1){}[i]`. + #. Let :math:`c_2` be :math:`{{\mathrm{unpack}}}_{{\mathit{lanetype}}}({{\mathrm{lanes}}}_{{{\mathit{lanetype}}}{\mathsf{x}}{N}}(c_1){}[i])`. #. Push the value :math:`({\mathit{lanetype}}{.}\mathsf{const}~c_2)` to the stack. @@ -7222,7 +8300,7 @@ #. Push the value :math:`(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c)` to the stack. -:math:`\mathsf{vextunop}~{\mathit{sh}}_1~{\mathit{sh}}_2~{\mathit{vextunop}}` +:math:`\mathsf{vextunop}~{\mathit{sh}}_2~{\mathit{sh}}_1~{\mathit{vextunop}}` ............................................................................. @@ -7235,7 +8313,7 @@ #. Push the value :math:`(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c)` to the stack. -:math:`\mathsf{vextbinop}~{\mathit{sh}}_1~{\mathit{sh}}_2~{\mathit{vextbinop}}` +:math:`\mathsf{vextbinop}~{\mathit{sh}}_2~{\mathit{sh}}_1~{\mathit{vextbinop}}` ............................................................................... @@ -7289,51 +8367,17 @@ #. Push the value :math:`(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c)` to the stack. -:math:`{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{M} {.} {{\mathit{vcvtop}}}{\mathsf{\_}}{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{{M'}}}` -.......................................................................................................................... +:math:`{\mathit{sh}}_2 {.} {{\mathit{vcvtop}}}{\mathsf{\_}}{{\mathit{sh}}_1}` +............................................................................. 1. Assert: Due to validation, a value of vector type :math:`\mathsf{v{\scriptstyle 128}}` is on the top of the stack. #. Pop the value :math:`(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c_1)` from the stack. -#. If :math:`{\mathrm{halfop}}({\mathit{vcvtop}})` is defined, then: +#. Let :math:`c` be :math:`{{\mathrm{vcvtop}}}_{{\mathit{sh}}_1, {\mathit{sh}}_2}({\mathit{vcvtop}}, c_1)`. - a. Let :math:`{\mathit{half}}` be :math:`{\mathrm{halfop}}({\mathit{vcvtop}})`. - - #. Let :math:`{{\mathit{ci}}^\ast}` be :math:`{{\mathrm{lanes}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{{M'}}}(c_1){}[{\mathrm{half}}({\mathit{half}}, 0, M) : M]`. - - #. Let :math:`{{{\mathit{cj}}^\ast}^\ast}` be :math:`{\Large\times}~{{{\mathrm{vcvtop}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{{M'}}, {{{\mathsf{i}}{n}}_2}{\mathsf{x}}{M}}({\mathit{vcvtop}}, {\mathit{ci}})^\ast}`. - - #. If :math:`{|{{{\mathrm{inv}}_{{\mathit{lanes}}}}_{{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{M}}({{\mathit{cj}}^\ast})^\ast}|} > 0`, then: - - 1) Let :math:`c` be an element of :math:`{{{\mathrm{inv}}_{{\mathit{lanes}}}}_{{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{M}}({{\mathit{cj}}^\ast})^\ast}`. - - #) Push the value :math:`(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c)` to the stack. - -#. Else if :math:`{\mathrm{zeroop}}({\mathit{vcvtop}})` is not defined and :math:`M = {M'}`, then: - - a. Let :math:`{{\mathit{ci}}^\ast}` be :math:`{{\mathrm{lanes}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{{M'}}}(c_1)`. - - #. Let :math:`{{{\mathit{cj}}^\ast}^\ast}` be :math:`{\Large\times}~{{{\mathrm{vcvtop}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{{M'}}, {{{\mathsf{i}}{n}}_2}{\mathsf{x}}{{M'}}}({\mathit{vcvtop}}, {\mathit{ci}})^\ast}`. - - #. If :math:`{|{{{\mathrm{inv}}_{{\mathit{lanes}}}}_{{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{{M'}}}({{\mathit{cj}}^\ast})^\ast}|} > 0`, then: - - 1) Let :math:`c` be an element of :math:`{{{\mathrm{inv}}_{{\mathit{lanes}}}}_{{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{{M'}}}({{\mathit{cj}}^\ast})^\ast}`. - - #) Push the value :math:`(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c)` to the stack. - -#. If :math:`{\mathrm{zeroop}}({\mathit{vcvtop}}) = \mathsf{zero}` and :math:`{{\mathsf{i}}{n}}_1` is number type and :math:`{{\mathsf{i}}{n}}_2` is number type, then: - - a. Let :math:`{{\mathit{ci}}^\ast}` be :math:`{{\mathrm{lanes}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{{M'}}}(c_1)`. - - #. Let :math:`{{{\mathit{cj}}^\ast}^\ast}` be :math:`{\Large\times}~{{{\mathrm{vcvtop}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{{M'}}, {{{\mathsf{i}}{n}}_2}{\mathsf{x}}{M}}({\mathit{vcvtop}}, {\mathit{ci}})^\ast}~{{\mathrm{zero}}({{\mathsf{i}}{n}}_2)^{{M'}}}`. - - #. If :math:`{|{{{\mathrm{inv}}_{{\mathit{lanes}}}}_{{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{M}}({{\mathit{cj}}^\ast})^\ast}|} > 0`, then: - - 1) Let :math:`c` be an element of :math:`{{{\mathrm{inv}}_{{\mathit{lanes}}}}_{{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{M}}({{\mathit{cj}}^\ast})^\ast}`. - - #) Push the value :math:`(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c)` to the stack. +#. Push the value :math:`(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c)` to the stack. :math:`\mathsf{local{.}tee}~x` @@ -7737,7 +8781,7 @@ a. Let :math:`{\mathit{vloadop}}_0` be :math:`{{\mathit{vloadop}}^?}`. - #. If :math:`{\mathit{vloadop}}_0` is some :math:`{\mathbb{N}}{\mathsf{x}}{\mathbb{N}}{\mathsf{\_}}{{\mathit{sx}}}`, then: + #. If :math:`{\mathit{vloadop}}_0` is some :math:`{{\mathit{sz}}}{\mathsf{x}}{M}{\mathsf{\_}}{{\mathit{sx}}}`, then: 1) Let :math:`({M}{\mathsf{x}}{N}{\mathsf{\_}}{{\mathit{sx}}})` be the destructuring of :math:`{\mathit{vloadop}}_0`. @@ -7753,7 +8797,7 @@ #) Push the value :math:`(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c)` to the stack. - #. If :math:`{\mathit{vloadop}}_0` is some :math:`{\mathbb{N}}{\mathsf{\_}}{\mathsf{splat}}`, then: + #. If :math:`{\mathit{vloadop}}_0` is some :math:`{{\mathit{sz}}}{\mathsf{\_}}{\mathsf{splat}}`, then: 1) Let :math:`({N}{\mathsf{\_}}{\mathsf{splat}})` be the destructuring of :math:`{\mathit{vloadop}}_0`. @@ -7771,7 +8815,7 @@ #) Push the value :math:`(\mathsf{v{\scriptstyle 128}}{.}\mathsf{const}~c)` to the stack. - #. If :math:`{\mathit{vloadop}}_0` is some :math:`{\mathbb{N}}{\mathsf{\_}}{\mathsf{zero}}`, then: + #. If :math:`{\mathit{vloadop}}_0` is some :math:`{{\mathit{sz}}}{\mathsf{\_}}{\mathsf{zero}}`, then: 1) Let :math:`({N}{\mathsf{\_}}{\mathsf{zero}})` be the destructuring of :math:`{\mathit{vloadop}}_0`. @@ -7860,7 +8904,7 @@ #. Execute the instruction :math:`({\mathsf{i{\scriptstyle 32}}{.}\mathsf{store}}{8})`. - #. Push the value :math:`(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~i + 1)` to the stack. + #. Push the value :math:`(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~{{\mathrm{iadd}}}_{32}(i, 1))` to the stack. #. Push the value :math:`{\mathit{val}}` to the stack. @@ -7911,9 +8955,9 @@ #) Execute the instruction :math:`({\mathsf{i{\scriptstyle 32}}{.}\mathsf{store}}{8})`. - #) Push the value :math:`(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~j + 1)` to the stack. + #) Push the value :math:`(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~{{\mathrm{iadd}}}_{32}(j, 1))` to the stack. - #) Push the value :math:`(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~i + 1)` to the stack. + #) Push the value :math:`(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~{{\mathrm{iadd}}}_{32}(i, 1))` to the stack. #. Else: @@ -7974,9 +9018,9 @@ #. Execute the instruction :math:`({\mathsf{i{\scriptstyle 32}}{.}\mathsf{store}}{8})`. - #. Push the value :math:`(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~j + 1)` to the stack. + #. Push the value :math:`(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~{{\mathrm{iadd}}}_{32}(j, 1))` to the stack. - #. Push the value :math:`(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~i + 1)` to the stack. + #. Push the value :math:`(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~{{\mathrm{iadd}}}_{32}(i, 1))` to the stack. #. Push the value :math:`(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~n - 1)` to the stack. @@ -8382,24 +9426,17 @@ 1. Return :math:`{2^{{\mathrm{signif}}(N) - 1}}`. -:math:`{\mathrm{lanetype}}({{\mathsf{i}}{n}}{\mathsf{x}}{N})` -............................................................. +:math:`{|{\mathit{packtype}}|}` +............................... -1. Return :math:`{\mathsf{i}}{n}`. +1. If :math:`{\mathit{packtype}} = \mathsf{i{\scriptstyle 8}}`, then: + a. Return :math:`8`. -:math:`{\mathrm{unpack}}({\mathit{lanetype}})` -.............................................. +#. Assert: Due to validation, :math:`{\mathit{packtype}} = \mathsf{i{\scriptstyle 16}}`. - -1. If :math:`{\mathit{lanetype}}` is number type, then: - - a. Return :math:`{\mathit{lanetype}}`. - -#. Assert: Due to validation, :math:`{\mathit{lanetype}}` is packed type. - -#. Return :math:`\mathsf{i{\scriptstyle 32}}`. +#. Return :math:`16`. :math:`{|{\mathit{valtype}}|}` @@ -8429,19 +9466,6 @@ #. Fail. -:math:`{|{\mathit{packtype}}|}` -............................... - - -1. If :math:`{\mathit{packtype}} = \mathsf{i{\scriptstyle 8}}`, then: - - a. Return :math:`8`. - -#. Assert: Due to validation, :math:`{\mathit{packtype}} = \mathsf{i{\scriptstyle 16}}`. - -#. Return :math:`16`. - - :math:`{|{\mathit{lanetype}}|}` ............................... @@ -8455,6 +9479,33 @@ #. Return :math:`{|{\mathit{lanetype}}|}`. +:math:`{\mathrm{lanetype}}({{\mathsf{i}}{n}}{\mathsf{x}}{N})` +............................................................. + + +1. Return :math:`{\mathsf{i}}{n}`. + + +:math:`{\mathrm{unpack}}({\mathit{lanetype}})` +.............................................. + + +1. If :math:`{\mathit{lanetype}}` is number type, then: + + a. Return :math:`{\mathit{lanetype}}`. + +#. Assert: Due to validation, :math:`{\mathit{lanetype}}` is packed type. + +#. Return :math:`\mathsf{i{\scriptstyle 32}}`. + + +:math:`{|\mathsf{v{\scriptstyle 128}}|}` +........................................ + + +1. Return :math:`128`. + + :math:`{|{\mathsf{i}}{n}|}` ........................... @@ -9361,7 +10412,11 @@ .................................................. -1. If :math:`{\mathit{lanetype}}` is number type, then: +1. If :math:`{\mathit{lanetype}}` is :math:`{\mathsf{i}}{n}`, then: + + a. Return :math:`c`. + +#. If :math:`{\mathit{lanetype}}` is :math:`{\mathsf{f}}{n}`, then: a. Return :math:`c`. @@ -9374,7 +10429,11 @@ .................................................... -1. If :math:`{\mathit{lanetype}}` is number type, then: +1. If :math:`{\mathit{lanetype}}` is :math:`{\mathsf{i}}{n}`, then: + + a. Return :math:`c`. + +#. If :math:`{\mathit{lanetype}}` is :math:`{\mathsf{f}}{n}`, then: a. Return :math:`c`. @@ -9383,27 +10442,33 @@ #. Return :math:`{{{{\mathrm{extend}}}_{{|{\mathit{lanetype}}|}, {|{\mathrm{unpack}}({\mathit{lanetype}})|}}^{\mathsf{u}}}}{(c)}`. -:math:`{\mathrm{zeroop}}({\mathit{vcvtop}})` -............................................ +:math:`{\mathrm{zeroop}}({{\mathit{lanetype}'}}{\mathsf{x}}{M_1}, {{\mathit{lanetype}}}{\mathsf{x}}{M_2}, {\mathit{vcvtop}})` +............................................................................................................................. -1. If :math:`{\mathit{vcvtop}}` is some :math:`\mathsf{extend}~{\mathit{half}}~{\mathit{sx}}`, then: +1. If :math:`{\mathit{lanetype}'}` is :math:`{\mathsf{i}}{n}`, then: - a. Return :math:`\epsilon`. + a. If :math:`{\mathit{lanetype}}` is :math:`{\mathsf{i}}{n}` and :math:`{\mathit{vcvtop}}` is some :math:`{\mathsf{extend}}{\mathsf{\_}}{{\mathit{half}}}{\mathsf{\_}}{{\mathit{sx}}}`, then: -#. If :math:`{\mathit{vcvtop}}` is some :math:`\mathsf{convert}~{{\mathit{half}}^?}~{\mathit{sx}}`, then: + 1) Return :math:`\epsilon`. - a. Return :math:`\epsilon`. + #. If :math:`{\mathit{lanetype}}` is :math:`{\mathsf{f}}{n}` and :math:`{\mathit{vcvtop}}` is some :math:`{\mathsf{convert}}{\mathsf{\_}}{{{\mathit{half}}^?}}{\mathsf{\_}}{{\mathit{sx}}}`, then: -#. If :math:`{\mathit{vcvtop}}` is some :math:`\mathsf{trunc\_sat}~{\mathit{sx}}~{{\mathit{zero}}^?}`, then: + 1) Return :math:`\epsilon`. - a. Let :math:`(\mathsf{trunc\_sat}~{\mathit{sx}}~{{\mathit{zero}}^?})` be the destructuring of :math:`{\mathit{vcvtop}}`. +#. Assert: Due to validation, :math:`{\mathit{lanetype}'}` is :math:`{\mathsf{f}}{n}`. + +#. If :math:`{\mathit{lanetype}}` is :math:`{\mathsf{i}}{n}` and :math:`{\mathit{vcvtop}}` is some :math:`{\mathsf{trunc\_sat}}{\mathsf{\_}}{{\mathit{sx}}}{\mathsf{\_}}{{{\mathit{zero}}^?}}`, then: + + a. Let :math:`({\mathsf{trunc\_sat}}{\mathsf{\_}}{{\mathit{sx}}}{\mathsf{\_}}{{{\mathit{zero}}^?}})` be the destructuring of :math:`{\mathit{vcvtop}}`. #. Return :math:`{{\mathit{zero}}^?}`. -#. If :math:`{\mathit{vcvtop}}` is some :math:`\mathsf{demote}~{\mathit{zero}}`, then: +#. Assert: Due to validation, :math:`{\mathit{lanetype}}` is :math:`{\mathsf{f}}{n}`. - a. Let :math:`(\mathsf{demote}~{\mathit{zero}})` be the destructuring of :math:`{\mathit{vcvtop}}`. +#. If :math:`{\mathit{vcvtop}}` is some :math:`{\mathsf{demote}}{\mathsf{\_}}{\mathsf{zero}}`, then: + + a. Let :math:`({\mathsf{demote}}{\mathsf{\_}}{\mathsf{zero}})` be the destructuring of :math:`{\mathit{vcvtop}}`. #. Return :math:`{\mathit{zero}}`. @@ -9412,27 +10477,33 @@ #. Return :math:`\epsilon`. -:math:`{\mathrm{halfop}}({\mathit{vcvtop}})` -............................................ +:math:`{\mathrm{halfop}}({{\mathit{lanetype}'}}{\mathsf{x}}{M_1}, {{\mathit{lanetype}}}{\mathsf{x}}{M_2}, {\mathit{vcvtop}})` +............................................................................................................................. -1. If :math:`{\mathit{vcvtop}}` is some :math:`\mathsf{extend}~{\mathit{half}}~{\mathit{sx}}`, then: +1. If :math:`{\mathit{lanetype}'}` is :math:`{\mathsf{i}}{n}`, then: - a. Let :math:`(\mathsf{extend}~{\mathit{half}}~{\mathit{sx}})` be the destructuring of :math:`{\mathit{vcvtop}}`. + a. If :math:`{\mathit{lanetype}}` is :math:`{\mathsf{i}}{n}` and :math:`{\mathit{vcvtop}}` is some :math:`{\mathsf{extend}}{\mathsf{\_}}{{\mathit{half}}}{\mathsf{\_}}{{\mathit{sx}}}`, then: - #. Return :math:`{\mathit{half}}`. + 1) Let :math:`({\mathsf{extend}}{\mathsf{\_}}{{\mathit{half}}}{\mathsf{\_}}{{\mathit{sx}}})` be the destructuring of :math:`{\mathit{vcvtop}}`. -#. If :math:`{\mathit{vcvtop}}` is some :math:`\mathsf{convert}~{{\mathit{half}}^?}~{\mathit{sx}}`, then: + #) Return :math:`{\mathit{half}}`. - a. Let :math:`(\mathsf{convert}~{{\mathit{half}}^?}~{\mathit{sx}})` be the destructuring of :math:`{\mathit{vcvtop}}`. + #. If :math:`{\mathit{lanetype}}` is :math:`{\mathsf{f}}{n}` and :math:`{\mathit{vcvtop}}` is some :math:`{\mathsf{convert}}{\mathsf{\_}}{{{\mathit{half}}^?}}{\mathsf{\_}}{{\mathit{sx}}}`, then: - #. Return :math:`{{\mathit{half}}^?}`. + 1) Let :math:`({\mathsf{convert}}{\mathsf{\_}}{{{\mathit{half}}^?}}{\mathsf{\_}}{{\mathit{sx}}})` be the destructuring of :math:`{\mathit{vcvtop}}`. -#. If :math:`{\mathit{vcvtop}}` is some :math:`\mathsf{trunc\_sat}~{\mathit{sx}}~{{\mathit{zero}}^?}`, then: + #) Return :math:`{{\mathit{half}}^?}`. + +#. Assert: Due to validation, :math:`{\mathit{lanetype}'}` is :math:`{\mathsf{f}}{n}`. + +#. If :math:`{\mathit{lanetype}}` is :math:`{\mathsf{i}}{n}` and :math:`{\mathit{vcvtop}}` is some :math:`{\mathsf{trunc\_sat}}{\mathsf{\_}}{{\mathit{sx}}}{\mathsf{\_}}{{{\mathit{zero}}^?}}`, then: a. Return :math:`\epsilon`. -#. If :math:`{\mathit{vcvtop}}` is some :math:`\mathsf{demote}~{\mathit{zero}}`, then: +#. Assert: Due to validation, :math:`{\mathit{lanetype}}` is :math:`{\mathsf{f}}{n}`. + +#. If :math:`{\mathit{vcvtop}}` is some :math:`{\mathsf{demote}}{\mathsf{\_}}{\mathsf{zero}}`, then: a. Return :math:`\epsilon`. @@ -10130,23 +11201,23 @@ #. Return :math:`{\mathit{v{\kern-0.1em\scriptstyle 128}}}`. -:math:`{{\mathrm{vcvtop}}}_{{{\mathit{lanetype}'}}{\mathsf{x}}{M_1}, {{\mathit{lanetype}}}{\mathsf{x}}{M_2}}({\mathit{vcvtop}}, {\mathit{iN}}_1)` +:math:`{{\mathrm{lcvtop}}}_{{{\mathit{lanetype}'}}{\mathsf{x}}{M_1}, {{\mathit{lanetype}}}{\mathsf{x}}{M_2}}({\mathit{vcvtop}}, {\mathit{iN}}_1)` ................................................................................................................................................. 1. If :math:`{\mathit{lanetype}'}` is :math:`{\mathsf{i}}{n}`, then: - a. If :math:`{\mathit{lanetype}}` is :math:`{\mathsf{i}}{n}` and :math:`{\mathit{vcvtop}}` is some :math:`\mathsf{extend}~{\mathit{half}}~{\mathit{sx}}`, then: + a. If :math:`{\mathit{lanetype}}` is :math:`{\mathsf{i}}{n}` and :math:`{\mathit{vcvtop}}` is some :math:`{\mathsf{extend}}{\mathsf{\_}}{{\mathit{half}}}{\mathsf{\_}}{{\mathit{sx}}}`, then: - 1) Let :math:`(\mathsf{extend}~{\mathit{half}}~{\mathit{sx}})` be the destructuring of :math:`{\mathit{vcvtop}}`. + 1) Let :math:`({\mathsf{extend}}{\mathsf{\_}}{{\mathit{half}}}{\mathsf{\_}}{{\mathit{sx}}})` be the destructuring of :math:`{\mathit{vcvtop}}`. #) Let :math:`{\mathit{iN}}_2` be :math:`{{{{\mathrm{extend}}}_{N_1, N_2}^{{\mathit{sx}}}}}{({\mathit{iN}}_1)}`. #) Return :math:`{\mathit{iN}}_2`. - #. If :math:`{\mathit{lanetype}}` is :math:`{\mathsf{f}}{n}` and :math:`{\mathit{vcvtop}}` is some :math:`\mathsf{convert}~{{\mathit{half}}^?}~{\mathit{sx}}`, then: + #. If :math:`{\mathit{lanetype}}` is :math:`{\mathsf{f}}{n}` and :math:`{\mathit{vcvtop}}` is some :math:`{\mathsf{convert}}{\mathsf{\_}}{{{\mathit{half}}^?}}{\mathsf{\_}}{{\mathit{sx}}}`, then: - 1) Let :math:`(\mathsf{convert}~{{\mathit{half}}^?}~{\mathit{sx}})` be the destructuring of :math:`{\mathit{vcvtop}}`. + 1) Let :math:`({\mathsf{convert}}{\mathsf{\_}}{{{\mathit{half}}^?}}{\mathsf{\_}}{{\mathit{sx}}})` be the destructuring of :math:`{\mathit{vcvtop}}`. #) Let :math:`{\mathit{fN}}_2` be :math:`{{{{\mathrm{convert}}}_{N_1, N_2}^{{\mathit{sx}}}}}{({\mathit{iN}}_1)}`. @@ -10154,9 +11225,9 @@ #. Assert: Due to validation, :math:`{\mathit{lanetype}'}` is :math:`{\mathsf{f}}{n}`. -#. If :math:`{\mathit{lanetype}}` is :math:`{\mathsf{i}}{n}` and :math:`{\mathit{vcvtop}}` is some :math:`\mathsf{trunc\_sat}~{\mathit{sx}}~{{\mathit{zero}}^?}`, then: +#. If :math:`{\mathit{lanetype}}` is :math:`{\mathsf{i}}{n}` and :math:`{\mathit{vcvtop}}` is some :math:`{\mathsf{trunc\_sat}}{\mathsf{\_}}{{\mathit{sx}}}{\mathsf{\_}}{{{\mathit{zero}}^?}}`, then: - a. Let :math:`(\mathsf{trunc\_sat}~{\mathit{sx}}~{{\mathit{zero}}^?})` be the destructuring of :math:`{\mathit{vcvtop}}`. + a. Let :math:`({\mathsf{trunc\_sat}}{\mathsf{\_}}{{\mathit{sx}}}{\mathsf{\_}}{{{\mathit{zero}}^?}})` be the destructuring of :math:`{\mathit{vcvtop}}`. #. Let :math:`{{\mathit{iN}}_2^?}` be :math:`{{{{\mathrm{trunc\_sat}}}_{N_1, N_2}^{{\mathit{sx}}}}}{({\mathit{iN}}_1)}`. @@ -10164,7 +11235,7 @@ #. Assert: Due to validation, :math:`{\mathit{lanetype}}` is :math:`{\mathsf{f}}{n}`. -#. If :math:`{\mathit{vcvtop}} = (\mathsf{demote}~\mathsf{zero})`, then: +#. If :math:`{\mathit{vcvtop}} = ({\mathsf{demote}}{\mathsf{\_}}{\mathsf{zero}})`, then: a. Let :math:`{{\mathit{fN}}_2^\ast}` be :math:`{{\mathrm{demote}}}_{N_1, N_2}({\mathit{iN}}_1)`. @@ -10177,15 +11248,52 @@ #. Return :math:`{{\mathit{fN}}_2^\ast}`. -:math:`{{\mathrm{vextunop}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{i}}{n}}_2}{\mathsf{x}}{M_2}}(\mathsf{extadd\_pairwise}~{\mathit{sx}}, c_1)` -............................................................................................................................................................ +:math:`{{\mathrm{vcvtop}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{M}, {{{\mathsf{i}}{n}}_2}{\mathsf{x}}{{M'}}}({\mathit{vcvtop}}, {\mathit{v{\kern-0.1em\scriptstyle 128}}}_1)` +........................................................................................................................................................................... -1. Let :math:`{{\mathit{ci}}^\ast}` be :math:`{{\mathrm{lanes}}}_{{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{M_2}}(c_1)`. +1. If :math:`M = {M'}` and :math:`{\mathrm{halfop}}({{{\mathsf{i}}{n}}_1}{\mathsf{x}}{{M'}}, {{{\mathsf{i}}{n}}_2}{\mathsf{x}}{{M'}}, {\mathit{vcvtop}})` is not defined and :math:`{\mathrm{zeroop}}({{{\mathsf{i}}{n}}_1}{\mathsf{x}}{{M'}}, {{{\mathsf{i}}{n}}_2}{\mathsf{x}}{{M'}}, {\mathit{vcvtop}})` is not defined, then: -#. Let :math:`{{\mathit{cj}}_1~{\mathit{cj}}_2^\ast}` be the result for which the :ref:`concatenation <notation-concat>` of :math:`{{\mathit{cj}}_1~{\mathit{cj}}_2^\ast}` is :math:`{{{{{\mathrm{extend}}}_{N_2, N_1}^{{\mathit{sx}}}}}{({\mathit{ci}})}^\ast}`. + a. Let :math:`{c_1^\ast}` be :math:`{{\mathrm{lanes}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{{M'}}}({\mathit{v{\kern-0.1em\scriptstyle 128}}}_1)`. -#. Let :math:`c` be :math:`{{\mathrm{inv}}_{{\mathit{lanes}}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{M_1}}({{{\mathrm{iadd}}}_{N_1}({\mathit{cj}}_1, {\mathit{cj}}_2)^\ast})`. + #. Let :math:`{{c^\ast}^\ast}` be :math:`{\Large\times}~{{{\mathrm{lcvtop}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{{M'}}, {{{\mathsf{i}}{n}}_2}{\mathsf{x}}{{M'}}}({\mathit{vcvtop}}, c_1)^\ast}`. + + #. Let :math:`{\mathit{v{\kern-0.1em\scriptstyle 128}}}` be an element of :math:`{{{\mathrm{inv}}_{{\mathit{lanes}}}}_{{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{{M'}}}({c^\ast})^\ast}`. + + #. Return :math:`{\mathit{v{\kern-0.1em\scriptstyle 128}}}`. + +#. If :math:`{\mathrm{halfop}}({{{\mathsf{i}}{n}}_1}{\mathsf{x}}{M}, {{{\mathsf{i}}{n}}_2}{\mathsf{x}}{{M'}}, {\mathit{vcvtop}})` is defined, then: + + a. Let :math:`{\mathit{half}}` be :math:`{\mathrm{halfop}}({{{\mathsf{i}}{n}}_1}{\mathsf{x}}{M}, {{{\mathsf{i}}{n}}_2}{\mathsf{x}}{{M'}}, {\mathit{vcvtop}})`. + + #. Let :math:`{c_1^\ast}` be :math:`{{\mathrm{lanes}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{M}}({\mathit{v{\kern-0.1em\scriptstyle 128}}}_1){}[{\mathrm{half}}({\mathit{half}}, 0, {M'}) : {M'}]`. + + #. Let :math:`{{c^\ast}^\ast}` be :math:`{\Large\times}~{{{\mathrm{lcvtop}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{M}, {{{\mathsf{i}}{n}}_2}{\mathsf{x}}{{M'}}}({\mathit{vcvtop}}, c_1)^\ast}`. + + #. Let :math:`{\mathit{v{\kern-0.1em\scriptstyle 128}}}` be an element of :math:`{{{\mathrm{inv}}_{{\mathit{lanes}}}}_{{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{{M'}}}({c^\ast})^\ast}`. + + #. Return :math:`{\mathit{v{\kern-0.1em\scriptstyle 128}}}`. + +#. Assert: Due to validation, :math:`{\mathrm{zeroop}}({{{\mathsf{i}}{n}}_1}{\mathsf{x}}{M}, {{{\mathsf{i}}{n}}_2}{\mathsf{x}}{{M'}}, {\mathit{vcvtop}}) = \mathsf{zero}`. + +#. Let :math:`{c_1^\ast}` be :math:`{{\mathrm{lanes}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{M}}({\mathit{v{\kern-0.1em\scriptstyle 128}}}_1)`. + +#. Let :math:`{{c^\ast}^\ast}` be :math:`{\Large\times}~{{{\mathrm{lcvtop}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{M}, {{{\mathsf{i}}{n}}_2}{\mathsf{x}}{{M'}}}({\mathit{vcvtop}}, c_1)^\ast}~{{{\mathrm{pack}}}_{{{\mathsf{i}}{n}}_2}({\mathrm{zero}}({\mathrm{unpack}}({{\mathsf{i}}{n}}_2)))^{M}}`. + +#. Let :math:`{\mathit{v{\kern-0.1em\scriptstyle 128}}}` be an element of :math:`{{{\mathrm{inv}}_{{\mathit{lanes}}}}_{{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{{M'}}}({c^\ast})^\ast}`. + +#. Return :math:`{\mathit{v{\kern-0.1em\scriptstyle 128}}}`. + + +:math:`{{\mathrm{vextunop}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{M_1}, {{{\mathsf{i}}{n}}_2}{\mathsf{x}}{M_2}}({\mathsf{extadd\_pairwise}}{\mathsf{\_}}{{\mathit{sx}}}, c_1)` +............................................................................................................................................................................ + + +1. Let :math:`{{\mathit{ci}}^\ast}` be :math:`{{\mathrm{lanes}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{M_1}}(c_1)`. + +#. Let :math:`{{\mathit{cj}}_1~{\mathit{cj}}_2^\ast}` be the result for which the :ref:`concatenation <notation-concat>` of :math:`{{\mathit{cj}}_1~{\mathit{cj}}_2^\ast}` is :math:`{{{{{\mathrm{extend}}}_{N_1, N_2}^{{\mathit{sx}}}}}{({\mathit{ci}})}^\ast}`. + +#. Let :math:`c` be :math:`{{\mathrm{inv}}_{{\mathit{lanes}}}}_{{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{M_2}}({{{\mathrm{iadd}}}_{N_2}({\mathit{cj}}_1, {\mathit{cj}}_2)^\ast})`. #. Return :math:`c`. @@ -10198,23 +11306,23 @@ a. Let :math:`({\mathsf{extmul}}{\mathsf{\_}}{{\mathit{half}}}{\mathsf{\_}}{{\mathit{sx}}})` be the destructuring of :math:`{\mathit{vextbinop}}`. - #. Let :math:`{{\mathit{ci}}_1^\ast}` be :math:`{{\mathrm{lanes}}}_{{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{M_2}}(c_1){}[{\mathrm{half}}({\mathit{half}}, 0, M_1) : M_1]`. + #. Let :math:`{{\mathit{ci}}_1^\ast}` be :math:`{{\mathrm{lanes}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{M_1}}(c_1){}[{\mathrm{half}}({\mathit{half}}, 0, M_2) : M_2]`. - #. Let :math:`{{\mathit{ci}}_2^\ast}` be :math:`{{\mathrm{lanes}}}_{{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{M_2}}(c_2){}[{\mathrm{half}}({\mathit{half}}, 0, M_1) : M_1]`. + #. Let :math:`{{\mathit{ci}}_2^\ast}` be :math:`{{\mathrm{lanes}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{M_1}}(c_2){}[{\mathrm{half}}({\mathit{half}}, 0, M_2) : M_2]`. - #. Let :math:`c` be :math:`{{\mathrm{inv}}_{{\mathit{lanes}}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{M_1}}({{{\mathrm{imul}}}_{N_1}({{{{\mathrm{extend}}}_{N_2, N_1}^{{\mathit{sx}}}}}{({\mathit{ci}}_1)}, {{{{\mathrm{extend}}}_{N_2, N_1}^{{\mathit{sx}}}}}{({\mathit{ci}}_2)})^\ast})`. + #. Let :math:`c` be :math:`{{\mathrm{inv}}_{{\mathit{lanes}}}}_{{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{M_2}}({{{\mathrm{imul}}}_{N_2}({{{{\mathrm{extend}}}_{N_1, N_2}^{{\mathit{sx}}}}}{({\mathit{ci}}_1)}, {{{{\mathrm{extend}}}_{N_1, N_2}^{{\mathit{sx}}}}}{({\mathit{ci}}_2)})^\ast})`. #. Return :math:`c`. #. Assert: Due to validation, :math:`{\mathit{vextbinop}} = `. -#. Let :math:`{{\mathit{ci}}_1^\ast}` be :math:`{{\mathrm{lanes}}}_{{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{M_2}}(c_1)`. +#. Let :math:`{{\mathit{ci}}_1^\ast}` be :math:`{{\mathrm{lanes}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{M_1}}(c_1)`. -#. Let :math:`{{\mathit{ci}}_2^\ast}` be :math:`{{\mathrm{lanes}}}_{{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{M_2}}(c_2)`. +#. Let :math:`{{\mathit{ci}}_2^\ast}` be :math:`{{\mathrm{lanes}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{M_1}}(c_2)`. -#. Let :math:`{{\mathit{cj}}_1~{\mathit{cj}}_2^\ast}` be the result for which the :ref:`concatenation <notation-concat>` of :math:`{{\mathit{cj}}_1~{\mathit{cj}}_2^\ast}` is :math:`{{{\mathrm{imul}}}_{N_1}({{{{\mathrm{extend}}}_{N_2, N_1}^{\mathsf{s}}}}{({\mathit{ci}}_1)}, {{{{\mathrm{extend}}}_{N_2, N_1}^{\mathsf{s}}}}{({\mathit{ci}}_2)})^\ast}`. +#. Let :math:`{{\mathit{cj}}_1~{\mathit{cj}}_2^\ast}` be the result for which the :ref:`concatenation <notation-concat>` of :math:`{{\mathit{cj}}_1~{\mathit{cj}}_2^\ast}` is :math:`{{{\mathrm{imul}}}_{N_2}({{{{\mathrm{extend}}}_{N_1, N_2}^{\mathsf{s}}}}{({\mathit{ci}}_1)}, {{{{\mathrm{extend}}}_{N_1, N_2}^{\mathsf{s}}}}{({\mathit{ci}}_2)})^\ast}`. -#. Let :math:`c` be :math:`{{\mathrm{inv}}_{{\mathit{lanes}}}}_{{{{\mathsf{i}}{n}}_1}{\mathsf{x}}{M_1}}({{{\mathrm{iadd}}}_{N_1}({\mathit{cj}}_1, {\mathit{cj}}_2)^\ast})`. +#. Let :math:`c` be :math:`{{\mathrm{inv}}_{{\mathit{lanes}}}}_{{{{\mathsf{i}}{n}}_2}{\mathsf{x}}{M_2}}({{{\mathrm{iadd}}}_{N_2}({\mathit{cj}}_1, {\mathit{cj}}_2)^\ast})`. #. Return :math:`c`. @@ -10225,13 +11333,13 @@ 1. If :math:`{\mathit{vshiftop}} = \mathsf{shl}`, then: - a. Return :math:`{{\mathrm{ishl}}}_{N}({\mathit{lane}}, n)`. + a. Return :math:`{{\mathrm{ishl}}}_{N}({\mathit{lane}}, n \mathbin{\mathrm{mod}} N)`. #. Assert: Due to validation, :math:`{\mathit{vshiftop}}` is some :math:`\mathsf{shr}~{\mathit{sx}}`. #. Let :math:`(\mathsf{shr}~{\mathit{sx}})` be the destructuring of :math:`{\mathit{vshiftop}}`. -#. Return :math:`{{{{\mathrm{ishr}}}_{N}^{{\mathit{sx}}}}}{({\mathit{lane}}, n)}`. +#. Return :math:`{{{{\mathrm{ishr}}}_{N}^{{\mathit{sx}}}}}{({\mathit{lane}}, n \mathbin{\mathrm{mod}} N)}`. :math:`{{\mathrm{default}}}_{{\mathit{valtype}}}` @@ -11021,15 +12129,19 @@ a. Return :math:`\epsilon`. -#. Assert: :math:`{\mathit{datamode}}` is some :math:`\mathsf{active}~{\mathit{memidx}}~{\mathit{expr}}`. +#. If :math:`{\mathit{datamode}}` is not some :math:`\mathsf{active}~{\mathit{memidx}}~{\mathit{expr}}`, then: + + a. Fail. #. Let :math:`(\mathsf{active}~{\mathit{memidx}}_0~{{\mathit{instr}}^\ast})` be the destructuring of :math:`{\mathit{datamode}}`. -#. Assert: Due to validation, :math:`{\mathit{memidx}}_0 = 0`. +#. If :math:`{\mathit{memidx}}_0 = 0`, then: -#. Let :math:`n` be the length of :math:`{{\mathit{byte}}^\ast}`. + a. Let :math:`n` be the length of :math:`{{\mathit{byte}}^\ast}`. -#. Return :math:`{{\mathit{instr}}^\ast}~(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~0)~(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~n)~(\mathsf{memory{.}init}~i)~(\mathsf{data{.}drop}~i)`. + #. Return :math:`{{\mathit{instr}}^\ast}~(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~0)~(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~n)~(\mathsf{memory{.}init}~i)~(\mathsf{data{.}drop}~i)`. + +#. Fail. :math:`{\mathrm{instantiate}}(s, {\mathit{module}}, {{\mathit{externaddr}}^\ast})` @@ -11444,12 +12556,7 @@ - the instruction (RELOP nt relop_nt) is valid with the function type [nt, nt] -> [I32]. Instr_ok/cvtop -- the instruction (CVTOP nt_1 nt_2 cvtop) is valid with the function type [nt_2] -> [nt_1] if: - - Either: - - cvtop is REINTERPRET. - - $size(nt_1) is $size(nt_2). - - Or: - +- the instruction (CVTOP nt_1 nt_2 cvtop) is valid with the function type [nt_2] -> [nt_1]. Instr_ok/ref.null - the instruction (REF.NULL rt) is valid with the function type [] -> [rt]. @@ -11643,18 +12750,18 @@ - (2 ^ memarg.ALIGN) is less than or equal to (M / 8). Instr_ok/vload -- the instruction (VLOAD V128 vloadop? memarg) is valid with the function type [I32] -> [V128] if: +- the instruction (VLOAD V128 vloadop_? memarg) is valid with the function type [I32] -> [V128] if: - Either: - - vloadop? is ?(). + - vloadop_? is ?(). - (2 ^ memarg.ALIGN) is less than or equal to ($size(V128) / 8). - Or: - - vloadop? is ?((SHAPE M X N _ sx)). + - vloadop_? is ?((SHAPE M X N _ sx)). - (2 ^ memarg.ALIGN) is less than or equal to ((M / 8) * N). - Or: - - vloadop? is ?((SPLAT n)). + - vloadop_? is ?((SPLAT n)). - (2 ^ memarg.ALIGN) is less than or equal to (n / 8). - Or: - - vloadop? is ?((ZERO n)). + - vloadop_? is ?((ZERO n)). - (2 ^ memarg.ALIGN) is less than or equal to (n / 8). Instr_ok/vload_lane @@ -11679,13 +12786,6 @@ - the value type t matches the value type t'. - t' is numtype or t' is vectype. -Instr_ok/cvtop-reinterpret -- the instruction (CVTOP nt_1 nt_2 REINTERPRET) is valid with the function type [nt_2] -> [nt_1] if: - - $size(nt_1) is $size(nt_2). - -Instr_ok/cvtop-convert -- the instruction (CVTOP nt_1 nt_2 cvtop) is valid with [nt_2] -> [nt_1]. - Instr_ok/load-val - the instruction (LOAD nt ?() memarg) is valid with the function type [I32] -> [nt] if: - (2 ^ memarg.ALIGN) is less than or equal to ($size(nt) / 8). @@ -12030,6 +13130,283 @@ - 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 if: + - |b*| is less than (2 ^ 32). + +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. + - |ref*| is less than (2 ^ 32). + +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']. + - admininstr' is valid with valtype* -> valtype'*. + - 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 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/instr +- [admininstr] is valid with t_1* -> t_2* if: + - admininstr is valid with t_1* -> t_2*. + +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 +- admininstr* 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) ; admininstr* 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. @@ -12413,7 +13790,7 @@ 3. If sx'? is not defined, then: a. Assert: Due to validation, lanetype is numtype. b. Assert: Due to validation, (i < |$lanes_(lanetype X N, c_1)|). - c. Let c_2 be $lanes_(lanetype X N, c_1)[i]. + c. Let c_2 be $unpacknum_(lanetype, $lanes_(lanetype X N, c_1)[i]). d. Push the value (lanetype.CONST c_2) to the stack. 4. Else: a. Assert: Due to validation, lanetype is packtype. @@ -12431,13 +13808,13 @@ 6. Let c be $inv_lanes_(Lnn X N, $lanes_(Lnn X N, c_1) with [i] replaced by $packnum_(Lnn, c_2)). 7. Push the value (V128.CONST c) to the stack. -Step_pure/vextunop sh_1 sh_2 vextunop +Step_pure/vextunop sh_2 sh_1 vextunop 1. Assert: Due to validation, a value of value type V128 is on the top of the stack. 2. Pop the value (V128.CONST c_1) from the stack. 3. Let c be $vextunop__(sh_1, sh_2, vextunop, c_1). 4. Push the value (V128.CONST c) to the stack. -Step_pure/vextbinop sh_1 sh_2 vextbinop +Step_pure/vextbinop sh_2 sh_1 vextbinop 1. Assert: Due to validation, a value of value type V128 is on the top of the stack. 2. Pop the value (V128.CONST c_2) from the stack. 3. Assert: Due to validation, a value of value type V128 is on the top of the stack. @@ -12463,28 +13840,11 @@ 11. Let c be $inv_lanes_(Jnn_2 X N_2, cj_1* :: cj_2*). 12. Push the value (V128.CONST c) to the stack. -Step_pure/vcvtop Lnn_2 X M Lnn_1 X M' vcvtop +Step_pure/vcvtop sh_2 sh_1 vcvtop 1. Assert: Due to validation, a value of value type V128 is on the top of the stack. 2. Pop the value (V128.CONST c_1) from the stack. -3. If $halfop(vcvtop) is defined, then: - a. Let ?(half) be $halfop(vcvtop). - b. Let ci* be $lanes_(Lnn_1 X M', c_1)[$half(half, 0, M) : M]. - c. Let cj** be $setproduct_(`lane_(Lnn_2), $vcvtop__(Lnn_1 X M', Lnn_2 X M, vcvtop, ci)*). - d. If (|$inv_lanes_(Lnn_2 X M, cj*)*| > 0), then: - 1) Let c be an element of $inv_lanes_(Lnn_2 X M, cj*)*. - 2) Push the value (V128.CONST c) to the stack. -4. Else if ($zeroop(vcvtop) is not defined /\ (M = M')), then: - a. Let ci* be $lanes_(Lnn_1 X M', c_1). - b. Let cj** be $setproduct_(`lane_(Lnn_2), $vcvtop__(Lnn_1 X M', Lnn_2 X M', vcvtop, ci)*). - c. If (|$inv_lanes_(Lnn_2 X M', cj*)*| > 0), then: - 1) Let c be an element of $inv_lanes_(Lnn_2 X M', cj*)*. - 2) Push the value (V128.CONST c) to the stack. -5. If (($zeroop(vcvtop) = ?(ZERO)) /\ (Lnn_1 is numtype /\ Lnn_2 is numtype)), then: - a. Let ci* be $lanes_(Lnn_1 X M', c_1). - b. Let cj** be $setproduct_(`lane_((nt_2 : numtype <: lanetype)), $vcvtop__(Lnn_1 X M', Lnn_2 X M, vcvtop, ci)* :: [$zero(Lnn_2)]^M'). - c. If (|$inv_lanes_(Lnn_2 X M, cj*)*| > 0), then: - 1) Let c be an element of $inv_lanes_(Lnn_2 X M, cj*)*. - 2) Push the value (V128.CONST c) to the stack. +3. Let c be $vcvtop__(sh_1, sh_2, vcvtop, c_1). +4. Push the value (V128.CONST c) to the stack. Step_pure/local.tee x 1. Assert: Due to validation, a value is on the top of the stack. @@ -12663,17 +14023,17 @@ e. Let c be $ibytes__1^-1(n, $mem(z, 0).BYTES[(i + ao.OFFSET) : (n / 8)]). f. Push the value (nt.CONST $extend__(n, $size(nt), sx, c)) to the stack. -Step_read/vload V128 vloadop? ao +Step_read/vload V128 vloadop_? 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. 3. Pop the value (I32.CONST i) from the stack. -4. If vloadop? is not defined, then: +4. If vloadop_? is not defined, then: a. If (((i + ao.OFFSET) + ($size(V128) / 8)) > |$mem(z, 0).BYTES|), then: 1) Trap. b. Let c be $vbytes__1^-1(V128, $mem(z, 0).BYTES[(i + ao.OFFSET) : ($size(V128) / 8)]). c. Push the value (V128.CONST c) to the stack. 5. Else: - a. Let ?(vloadop_0) be vloadop?. + a. Let ?(vloadop_0) be vloadop_?. b. If vloadop_0 is some SHAPE, then: 1) Let (SHAPE M X N _ sx) be vloadop_0. 2) If (((i + ao.OFFSET) + ((M * N) / 8)) > |$mem(z, 0).BYTES|), then: @@ -12734,7 +14094,7 @@ a. Push the value (I32.CONST i) to the stack. b. Push the value val to the stack. c. Execute the instruction (STORE I32 ?(8) $memarg0()). - d. Push the value (I32.CONST (i + 1)) to the stack. + d. Push the value (I32.CONST $iadd_(32, i, 1)) to the stack. e. Push the value val to the stack. f. Push the value (I32.CONST (n - 1)) to the stack. g. Execute the instruction MEMORY.FILL. @@ -12759,8 +14119,8 @@ 2) Push the value (I32.CONST i) to the stack. 3) Execute the instruction (LOAD I32 ?(8 _ U) $memarg0()). 4) Execute the instruction (STORE I32 ?(8) $memarg0()). - 5) Push the value (I32.CONST (j + 1)) to the stack. - 6) Push the value (I32.CONST (i + 1)) to the stack. + 5) Push the value (I32.CONST $iadd_(32, j, 1)) to the stack. + 6) Push the value (I32.CONST $iadd_(32, i, 1)) to the stack. b. Else: 1) Push the value (I32.CONST ((j + n) - 1)) to the stack. 2) Push the value (I32.CONST ((i + n) - 1)) to the stack. @@ -12790,8 +14150,8 @@ b. Push the value (I32.CONST j) to the stack. c. Push the value (I32.CONST $data(z, x).BYTES[i]) to the stack. d. Execute the instruction (STORE I32 ?(8) $memarg0()). - e. Push the value (I32.CONST (j + 1)) to the stack. - f. Push the value (I32.CONST (i + 1)) to the stack. + e. Push the value (I32.CONST $iadd_(32, j, 1)) to the stack. + f. Push the value (I32.CONST $iadd_(32, i, 1)) to the stack. g. Push the value (I32.CONST (n - 1)) to the stack. h. Execute the instruction (MEMORY.INIT x). @@ -12981,14 +14341,11 @@ canon_ N 1. Return (2 ^ ($signif(N) - 1)). -lanetype Lnn X N -1. Return Lnn. - -unpack lanetype -1. If lanetype is numtype, then: - a. Return lanetype. -2. Assert: Due to validation, lanetype is packtype. -3. Return I32. +psize packtype +1. If (packtype = I8), then: + a. Return 8. +2. Assert: Due to validation, (packtype = I16). +3. Return 16. size valtype 1. If (valtype = I32), then: @@ -13003,18 +14360,24 @@ a. Return 128. 6. Fail. -psize packtype -1. If (packtype = I8), then: - a. Return 8. -2. Assert: Due to validation, (packtype = I16). -3. Return 16. - lsize lanetype 1. If lanetype is numtype, then: a. Return $size(lanetype). 2. Assert: Due to validation, lanetype is packtype. 3. Return $psize(lanetype). +lanetype Lnn X N +1. Return Lnn. + +unpack lanetype +1. If lanetype is numtype, then: + a. Return lanetype. +2. Assert: Due to validation, lanetype is packtype. +3. Return I32. + +vsize V128 +1. Return 128. + isize Inn 1. Return $size(Inn). @@ -13365,33 +14728,33 @@ 8. Assert: Due to validation, (relop_ = GE). 9. Return $fge_($sizenn(numtype), iN_1, iN_2). -cvtop__ numtype numtype' cvtop iN_1 +cvtop__ numtype numtype' cvtop__ iN_1 1. If (numtype is Inn /\ numtype' is Inn), then: - a. If cvtop is some EXTEND, then: - 1) Let (EXTEND sx) be cvtop. + a. If cvtop__ is some EXTEND, then: + 1) Let (EXTEND sx) be cvtop__. 2) Return [$extend__($sizenn1(numtype), $sizenn2(numtype'), sx, iN_1)]. - b. If (cvtop = WRAP), then: + b. If (cvtop__ = WRAP), then: 1) Return [$wrap__($sizenn1(numtype), $sizenn2(numtype'), iN_1)]. 2. If (numtype is Fnn /\ numtype' is Inn), then: - a. If cvtop is some TRUNC, then: - 1) Let (TRUNC sx) be cvtop. + a. If cvtop__ is some TRUNC, then: + 1) Let (TRUNC sx) be cvtop__. 2) Return $list_(`num_((Inn_2 : Inn <: numtype)), $trunc__($sizenn1(numtype), $sizenn2(numtype'), sx, iN_1)). - b. If cvtop is some TRUNC_SAT, then: - 1) Let (TRUNC_SAT sx) be cvtop. + b. If cvtop__ is some TRUNC_SAT, then: + 1) Let (TRUNC_SAT sx) be cvtop__. 2) Return $list_(`num_((Inn_2 : Inn <: numtype)), $trunc_sat__($sizenn1(numtype), $sizenn2(numtype'), sx, iN_1)). -3. If (numtype is Inn /\ (numtype' is Fnn /\ cvtop is some CONVERT)), then: - a. Let (CONVERT sx) be cvtop. +3. If (numtype is Inn /\ (numtype' is Fnn /\ cvtop__ is some CONVERT)), then: + a. Let (CONVERT sx) be cvtop__. b. Return [$convert__($sizenn1(numtype), $sizenn2(numtype'), sx, iN_1)]. 4. If (numtype is Fnn /\ numtype' is Fnn), then: - a. If (cvtop = PROMOTE), then: + a. If (cvtop__ = PROMOTE), then: 1) Return $promote__($sizenn1(numtype), $sizenn2(numtype'), iN_1). - b. If (cvtop = DEMOTE), then: + b. If (cvtop__ = DEMOTE), then: 1) Return $demote__($sizenn1(numtype), $sizenn2(numtype'), iN_1). -5. If (numtype is Inn /\ (numtype' is Fnn /\ ((cvtop = REINTERPRET) /\ ($size(numtype) = $size(numtype'))))), then: +5. If (numtype is Inn /\ (numtype' is Fnn /\ ((cvtop__ = REINTERPRET) /\ ($size(numtype) = $size(numtype'))))), then: a. Return [$reinterpret__(numtype, numtype', iN_1)]. 6. Assert: Due to validation, numtype is Fnn. 7. Assert: Due to validation, numtype' is Inn. -8. Assert: Due to validation, (cvtop = REINTERPRET). +8. Assert: Due to validation, (cvtop__ = REINTERPRET). 9. Assert: Due to validation, ($size(numtype) = $size(numtype')). 10. Return [$reinterpret__(numtype, numtype', iN_1)]. @@ -13439,44 +14802,54 @@ 3. Return $inv_signed_(N, $sat_s_(N, ($signed_(N, i_1) - $signed_(N, i_2)))). packnum_ lanetype c -1. If lanetype is numtype, then: +1. If lanetype is Inn, then: a. Return c. -2. Assert: Due to validation, lanetype is packtype. -3. Return $wrap__($size($unpack(lanetype)), $psize(lanetype), c). +2. If lanetype is Fnn, then: + a. Return c. +3. Assert: Due to validation, lanetype is packtype. +4. Return $wrap__($size($unpack(lanetype)), $psize(lanetype), c). unpacknum_ lanetype c -1. If lanetype is numtype, then: +1. If lanetype is Inn, then: a. Return c. -2. Assert: Due to validation, lanetype is packtype. -3. Return $extend__($psize(lanetype), $size($unpack(lanetype)), U, c). +2. If lanetype is Fnn, then: + a. Return c. +3. Assert: Due to validation, lanetype is packtype. +4. Return $extend__($psize(lanetype), $size($unpack(lanetype)), U, c). -zeroop vcvtop -1. If vcvtop is some EXTEND, then: - a. Return ?(). -2. If vcvtop is some CONVERT, then: - a. Return ?(). -3. If vcvtop is some TRUNC_SAT, then: - a. Let (TRUNC_SAT sx zero?) be vcvtop. +zeroop lanetype' X M_1 lanetype X M_2 vcvtop__ +1. If lanetype' is Jnn, then: + a. If (lanetype is Jnn /\ vcvtop__ is some EXTEND), then: + 1) Return ?(). + b. If (lanetype is Fnn /\ vcvtop__ is some CONVERT), then: + 1) Return ?(). +2. Assert: Due to validation, lanetype' is Fnn. +3. If (lanetype is Inn /\ vcvtop__ is some TRUNC_SAT), then: + a. Let (TRUNC_SAT sx zero?) be vcvtop__. b. Return zero?. -4. If vcvtop is some DEMOTE, then: - a. Let (DEMOTE zero) be vcvtop. +4. Assert: Due to validation, lanetype is Fnn. +5. If vcvtop__ is some DEMOTE, then: + a. Let (DEMOTE zero) be vcvtop__. b. Return ?(zero). -5. Assert: Due to validation, (vcvtop = PROMOTELOW). -6. Return ?(). +6. Assert: Due to validation, (vcvtop__ = PROMOTELOW). +7. Return ?(). -halfop vcvtop -1. If vcvtop is some EXTEND, then: - a. Let (EXTEND half sx) be vcvtop. - b. Return ?(half). -2. If vcvtop is some CONVERT, then: - a. Let (CONVERT half? sx) be vcvtop. - b. Return half?. -3. If vcvtop is some TRUNC_SAT, then: +halfop lanetype' X M_1 lanetype X M_2 vcvtop__ +1. If lanetype' is Jnn, then: + a. If (lanetype is Jnn /\ vcvtop__ is some EXTEND), then: + 1) Let (EXTEND half sx) be vcvtop__. + 2) Return ?(half). + b. If (lanetype is Fnn /\ vcvtop__ is some CONVERT), then: + 1) Let (CONVERT half? sx) be vcvtop__. + 2) Return half?. +2. Assert: Due to validation, lanetype' is Fnn. +3. If (lanetype is Inn /\ vcvtop__ is some TRUNC_SAT), then: a. Return ?(). -4. If vcvtop is some DEMOTE, then: +4. Assert: Due to validation, lanetype is Fnn. +5. If vcvtop__ is some DEMOTE, then: a. Return ?(). -5. Assert: Due to validation, (vcvtop = PROMOTELOW). -6. Return ?(LOW). +6. Assert: Due to validation, (vcvtop__ = PROMOTELOW). +7. Return ?(LOW). half half i j 1. If (half = LOW), then: @@ -13819,55 +15192,73 @@ 14. Let v128 be $inv_lanes_(Inn X M, lane_3*). 15. Return v128. -vcvtop__ lanetype' X M_1 lanetype X M_2 vcvtop iN_1 +lcvtop__ lanetype' X M_1 lanetype X M_2 vcvtop__ iN_1 1. If lanetype' is Jnn, then: - a. If (lanetype is Jnn /\ vcvtop is some EXTEND), then: - 1) Let (EXTEND half sx) be vcvtop. + a. If (lanetype is Jnn /\ vcvtop__ is some EXTEND), then: + 1) Let (EXTEND half sx) be vcvtop__. 2) Let iN_2 be $extend__($lsizenn1(lanetype'), $lsizenn2(lanetype), sx, iN_1). 3) Return [iN_2]. - b. If (lanetype is Fnn /\ vcvtop is some CONVERT), then: - 1) Let (CONVERT half? sx) be vcvtop. + b. If (lanetype is Fnn /\ vcvtop__ is some CONVERT), then: + 1) Let (CONVERT half? sx) be vcvtop__. 2) Let fN_2 be $convert__($lsizenn1(lanetype'), $lsizenn2(lanetype), sx, iN_1). 3) Return [fN_2]. 2. Assert: Due to validation, lanetype' is Fnn. -3. If (lanetype is Inn /\ vcvtop is some TRUNC_SAT), then: - a. Let (TRUNC_SAT sx zero?) be vcvtop. +3. If (lanetype is Inn /\ vcvtop__ is some TRUNC_SAT), then: + a. Let (TRUNC_SAT sx zero?) be vcvtop__. b. Let iN_2? be $trunc_sat__($lsizenn1(lanetype'), $lsizenn2(lanetype), sx, iN_1). c. Return $list_(`lane_((Inn_2 : Inn <: lanetype)), iN_2?). 4. Assert: Due to validation, lanetype is Fnn. -5. If (vcvtop = (DEMOTE ZERO)), then: +5. If (vcvtop__ = (DEMOTE ZERO)), then: a. Let fN_2* be $demote__($lsizenn1(lanetype'), $lsizenn2(lanetype), iN_1). b. Return fN_2*. -6. Assert: Due to validation, (vcvtop = PROMOTELOW). +6. Assert: Due to validation, (vcvtop__ = PROMOTELOW). 7. Let fN_2* be $promote__($lsizenn1(lanetype'), $lsizenn2(lanetype), iN_1). 8. Return fN_2*. -vextunop__ Inn_1 X M_1 Inn_2 X M_2 (EXTADD_PAIRWISE sx) c_1 -1. Let ci* be $lanes_(Inn_2 X M_2, c_1). -2. Let [cj_1, cj_2]* be $concat__1^-1(`iN($lsizenn1((Inn_1 : Inn <: lanetype))), $extend__($lsizenn2(Inn_2), $lsizenn1(Inn_1), sx, ci)*). -3. Let c be $inv_lanes_(Inn_1 X M_1, $iadd_($lsizenn1(Inn_1), cj_1, cj_2)*). +vcvtop__ Lnn_1 X M Lnn_2 X M' vcvtop v128_1 +1. If ((M = M') /\ ($halfop(Lnn_1 X M', Lnn_2 X M', vcvtop) is not defined /\ $zeroop(Lnn_1 X M', Lnn_2 X M', vcvtop) is not defined)), then: + a. Let c_1* be $lanes_(Lnn_1 X M', v128_1). + b. Let c** be $setproduct_(`lane_(Lnn_2), $lcvtop__(Lnn_1 X M', Lnn_2 X M', vcvtop, c_1)*). + c. Let v128 be an element of $inv_lanes_(Lnn_2 X M', c*)*. + d. Return v128. +2. If $halfop(Lnn_1 X M, Lnn_2 X M', vcvtop) is defined, then: + a. Let ?(half) be $halfop(Lnn_1 X M, Lnn_2 X M', vcvtop). + b. Let c_1* be $lanes_(Lnn_1 X M, v128_1)[$half(half, 0, M') : M']. + c. Let c** be $setproduct_(`lane_(Lnn_2), $lcvtop__(Lnn_1 X M, Lnn_2 X M', vcvtop, c_1)*). + d. Let v128 be an element of $inv_lanes_(Lnn_2 X M', c*)*. + e. Return v128. +3. Assert: Due to validation, ($zeroop(Lnn_1 X M, Lnn_2 X M', vcvtop) = ?(ZERO)). +4. Let c_1* be $lanes_(Lnn_1 X M, v128_1). +5. Let c** be $setproduct_(`lane_(Lnn_2), $lcvtop__(Lnn_1 X M, Lnn_2 X M', vcvtop, c_1)* :: [$packnum_(Lnn_2, $zero($unpack(Lnn_2)))]^M). +6. Let v128 be an element of $inv_lanes_(Lnn_2 X M', c*)*. +7. Return v128. + +vextunop__ Jnn_1 X M_1 Jnn_2 X M_2 (EXTADD_PAIRWISE sx) c_1 +1. Let ci* be $lanes_(Jnn_1 X M_1, c_1). +2. Let [cj_1, cj_2]* be $concat__1^-1(`iN($lsizenn1((Jnn_2 : Jnn <: lanetype))), $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), sx, ci)*). +3. Let c be $inv_lanes_(Jnn_2 X M_2, $iadd_($lsizenn2(Jnn_2), cj_1, cj_2)*). 4. Return c. -vextbinop__ Inn_1 X M_1 Inn_2 X M_2 vextbinop_ c_1 c_2 -1. If vextbinop_ is some EXTMUL, then: - a. Let (EXTMUL half sx) be vextbinop_. - b. Let ci_1* be $lanes_(Inn_2 X M_2, c_1)[$half(half, 0, M_1) : M_1]. - c. Let ci_2* be $lanes_(Inn_2 X M_2, c_2)[$half(half, 0, M_1) : M_1]. - d. Let c be $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))*). +vextbinop__ Jnn_1 X M_1 Jnn_2 X M_2 vextbinop__ c_1 c_2 +1. If vextbinop__ is some EXTMUL, then: + a. Let (EXTMUL half sx) be vextbinop__. + b. Let ci_1* be $lanes_(Jnn_1 X M_1, c_1)[$half(half, 0, M_2) : M_2]. + c. Let ci_2* be $lanes_(Jnn_1 X M_1, c_2)[$half(half, 0, M_2) : M_2]. + d. Let c be $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))*). e. Return c. -2. Assert: Due to validation, (vextbinop_ = DOTS). -3. Let ci_1* be $lanes_(Inn_2 X M_2, c_1). -4. Let ci_2* be $lanes_(Inn_2 X M_2, c_2). -5. Let [cj_1, cj_2]* be $concat__1^-1(`iN($lsizenn1((Inn_1 : Inn <: lanetype))), $imul_($lsizenn1(Inn_1), $extend__($lsizenn2(Inn_2), $lsizenn1(Inn_1), S, ci_1), $extend__($lsizenn2(Inn_2), $lsizenn1(Inn_1), S, ci_2))*). -6. Let c be $inv_lanes_(Inn_1 X M_1, $iadd_($lsizenn1(Inn_1), cj_1, cj_2)*). +2. Assert: Due to validation, (vextbinop__ = DOTS). +3. Let ci_1* be $lanes_(Jnn_1 X M_1, c_1). +4. Let ci_2* be $lanes_(Jnn_1 X M_1, c_2). +5. Let [cj_1, cj_2]* be $concat__1^-1(`iN($lsizenn2((Jnn_2 : Jnn <: lanetype))), $imul_($lsizenn2(Jnn_2), $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), S, ci_1), $extend__($lsizenn1(Jnn_1), $lsizenn2(Jnn_2), S, ci_2))*). +6. Let c be $inv_lanes_(Jnn_2 X M_2, $iadd_($lsizenn2(Jnn_2), cj_1, cj_2)*). 7. Return c. vshiftop_ Jnn X M vshiftop_ lane n 1. If (vshiftop_ = SHL), then: - a. Return $ishl_($lsizenn(Jnn), lane, n). + a. Return $ishl_($lsizenn(Jnn), lane, (n \ $lsizenn(Jnn))). 2. Assert: Due to validation, vshiftop_ is some SHR. 3. Let (SHR sx) be vshiftop_. -4. Return $ishr_($lsizenn(Jnn), sx, lane, n). +4. Return $ishr_($lsizenn(Jnn), sx, lane, (n \ $lsizenn(Jnn))). default_ valtype 1. If (valtype = I32), then: @@ -14235,11 +15626,13 @@ rundata (DATA byte* datamode) i 1. If (datamode = PASSIVE), then: a. Return []. -2. Assert: Due to validation, datamode is some ACTIVE. +2. If datamode is not ACTIVE, then: + a. Fail. 3. Let (ACTIVE memidx_0 instr*) be datamode. -4. Assert: Due to validation, (memidx_0 = 0). -5. Let n be |byte*|. -6. Return instr* :: [(I32.CONST 0), (I32.CONST n), (MEMORY.INIT i), (DATA.DROP i)]. +4. If (memidx_0 = 0), then: + a. Let n be |byte*|. + b. Return instr* :: [(I32.CONST 0), (I32.CONST n), (MEMORY.INIT i), (DATA.DROP i)]. +5. Fail. instantiate s module externaddr* 1. Let xt_I* -> xt_E* be $Module_ok(module). @@ -18446,7 +19839,10 @@ -The data instance :math:`\{ \mathsf{bytes}~{b^\ast} \}` is :ref:`valid <valid-val>` with the data type :math:`\mathsf{ok}`. +The data instance :math:`\{ \mathsf{bytes}~{b^\ast} \}` is :ref:`valid <valid-val>` with the data type :math:`\mathsf{ok}` if: + + + * The length of :math:`{b^\ast}` is less than :math:`{2^{32}}`. @@ -18460,6 +19856,8 @@ * The reference value :math:`{\mathit{ref}}` is :ref:`valid <valid-val>` with the reference type :math:`{\mathit{rt}}`. + * The length of :math:`{{\mathit{ref}}^\ast}` is less than :math:`{2^{32}}`. + @@ -18610,8 +20008,6 @@ * The frame :math:`f` is :ref:`valid <valid-val>` with the context :math:`{C'}`. - * The result type :math:`{C'}{.}\mathsf{return}` is of the form :math:`{{\mathit{valtype}'}^{n}}`. - * :math:`{{\mathit{instr}''}^\ast}` is valid with :math:`{{\mathit{valtype}'}^{n}}`. * Under the context :math:`\{ \mathsf{return}~\epsilon \}`, the result type :math:`{{\mathit{valtype}'}^{n}}` is :ref:`valid <valid-val>`. @@ -18696,8 +20092,6 @@ * The frame :math:`f` is :ref:`valid <valid-val>` with the context :math:`{C'}`. - * The result type :math:`{C'}{.}\mathsf{return}` is of the form :math:`{t^{n}}`. - * :math:`{{\mathit{instr}}^\ast}` is valid with :math:`{t^{n}}`. * Under the context :math:`\{ \mathsf{return}~\epsilon \}`, the result type :math:`{t^{n}}` is :ref:`valid <valid-val>`. @@ -20440,7 +21834,7 @@ #. Assert: Due to validation, :math:`i < {|{{\mathrm{lanes}}}_{{{\mathit{lanetype}}}{\mathsf{x}}{M}}(c_1)|}`. - #. Let :math:`c_2` be :math:`{{\mathrm{lanes}}}_{{{\mathit{lanetype}}}{\mathsf{x}}{M}}(c_1){}[i]`. + #. Let :math:`c_2` be :math:`{{\mathrm{unpack}}}_{{\mathit{lanetype}}}({{\mathrm{lanes}}}_{{{\mathit{lanetype}}}{\mathsf{x}}{M}}(c_1){}[i])`. #. Push the value :math:`({\mathit{lanetype}}{.}\mathsf{const}~c_2)` to the stack. @@ -21359,7 +22753,7 @@ #. Execute the instruction :math:`({\mathsf{i{\scriptstyle 32}}{.}\mathsf{store}}{8}~x)`. - #. Push the value :math:`({\mathit{at}}{.}\mathsf{const}~i + 1)` to the stack. + #. Push the value :math:`({\mathit{at}}{.}\mathsf{const}~{{\mathrm{iadd}}}_{{|{\mathit{at}}|}}(i, 1))` to the stack. #. Push the value :math:`{\mathit{val}}` to the stack. @@ -21410,9 +22804,9 @@ #) Execute the instruction :math:`({\mathsf{i{\scriptstyle 32}}{.}\mathsf{store}}{8}~x_1)`. - #) Push the value :math:`({\mathit{at}}_1{.}\mathsf{const}~i_1 + 1)` to the stack. + #) Push the value :math:`({\mathit{at}}_1{.}\mathsf{const}~{{\mathrm{iadd}}}_{{|{\mathit{at}}_1|}}(i_1, 1))` to the stack. - #) Push the value :math:`({\mathit{at}}_2{.}\mathsf{const}~i_2 + 1)` to the stack. + #) Push the value :math:`({\mathit{at}}_2{.}\mathsf{const}~{{\mathrm{iadd}}}_{{|{\mathit{at}}_2|}}(i_2, 1))` to the stack. #. Else: @@ -21473,9 +22867,9 @@ #. Execute the instruction :math:`({\mathsf{i{\scriptstyle 32}}{.}\mathsf{store}}{8}~x)`. - #. Push the value :math:`({\mathit{at}}{.}\mathsf{const}~i + 1)` to the stack. + #. Push the value :math:`({\mathit{at}}{.}\mathsf{const}~{{\mathrm{iadd}}}_{{|{\mathit{at}}|}}(i, 1))` to the stack. - #. Push the value :math:`(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~j + 1)` to the stack. + #. Push the value :math:`(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~{{\mathrm{iadd}}}_{32}(j, 1))` to the stack. #. Push the value :math:`(\mathsf{i{\scriptstyle 32}}{.}\mathsf{const}~n - 1)` to the stack. @@ -23614,15 +25008,21 @@ #) 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`. @@ -25652,7 +27052,11 @@ .................................................. -1. If :math:`{\mathit{lanetype}}` is number type, then: +1. If :math:`{\mathit{lanetype}}` is :math:`{\mathsf{i}}{N}`, then: + + a. Return :math:`c`. + +#. If :math:`{\mathit{lanetype}}` is :math:`{\mathsf{f}}{N}`, then: a. Return :math:`c`. @@ -25678,7 +27082,11 @@ .................................................... -1. If :math:`{\mathit{lanetype}}` is number type, then: +1. If :math:`{\mathit{lanetype}}` is :math:`{\mathsf{i}}{N}`, then: + + a. Return :math:`c`. + +#. If :math:`{\mathit{lanetype}}` is :math:`{\mathsf{f}}{N}`, then: a. Return :math:`c`. @@ -30540,13 +31948,15 @@ - Under the context { RETURN: ?() }, the value type t is valid. Datainst_ok -- the data instance { BYTES: b* } is valid with the data type OK. +- the data instance { BYTES: b* } is valid with the data type OK if: + - |b*| is less than (2 ^ 32). Eleminst_ok - the element instance { TYPE: rt; REFS: ref* } is valid with the element type rt if: - Under the context { RETURN: ?() }, rt is valid. - For all ref in ref*: - the reference value ref is valid with rt. + - |ref*| is less than (2 ^ 32). Exportinst_ok - the export instance { NAME: nm; ADDR: xa } is valid if: @@ -30624,7 +32034,6 @@ - valtype* is []. - localidx* is []. - the frame f is valid with the context C'. - - the result type C'.RETURN is ?(valtype'^n). - instr''* is valid with valtype'^n. - Under the context { RETURN: ?() }, the result type valtype'^n is valid. - Or: @@ -30668,7 +32077,6 @@ Instr_ok2/frame - (FRAME_ n { f } instr*) is valid with [] -> t^n if: - the frame f is valid with the context C'. - - the result type C'.RETURN is ?(t^n). - instr* is valid with t^n. - Under the context { RETURN: ?() }, the result type t^n is valid. @@ -31501,7 +32909,7 @@ 3. If sx'? is not defined, then: a. Assert: Due to validation, lanetype is numtype. b. Assert: Due to validation, (i < |$lanes_(lanetype X M, c_1)|). - c. Let c_2 be $lanes_(lanetype X M, c_1)[i]. + c. Let c_2 be $lunpacknum_(lanetype, $lanes_(lanetype X M, c_1)[i]). d. Push the value (lanetype.CONST c_2) to the stack. 4. Else: a. Assert: Due to validation, lanetype is packtype. @@ -31935,7 +33343,7 @@ a. Push the value (at.CONST i) to the stack. b. Push the value val to the stack. c. Execute the instruction (STORE I32 ?(8) x $memarg0()). - d. Push the value (at.CONST (i + 1)) to the stack. + d. Push the value (at.CONST $iadd_($size(at), i, 1)) to the stack. e. Push the value val to the stack. f. Push the value (at.CONST (n - 1)) to the stack. g. Execute the instruction (MEMORY.FILL x). @@ -31960,8 +33368,8 @@ 2) Push the value (at_2.CONST i_2) to the stack. 3) Execute the instruction (LOAD I32 ?(8 _ U) x_2 $memarg0()). 4) Execute the instruction (STORE I32 ?(8) x_1 $memarg0()). - 5) Push the value (at_1.CONST (i_1 + 1)) to the stack. - 6) Push the value (at_2.CONST (i_2 + 1)) to the stack. + 5) Push the value (at_1.CONST $iadd_($size(at_1), i_1, 1)) to the stack. + 6) Push the value (at_2.CONST $iadd_($size(at_2), i_2, 1)) to the stack. b. Else: 1) Push the value (at_1.CONST ((i_1 + n) - 1)) to the stack. 2) Push the value (at_2.CONST ((i_2 + n) - 1)) to the stack. @@ -31991,8 +33399,8 @@ b. Push the value (at.CONST i) to the stack. c. Push the value (I32.CONST $data(z, y).BYTES[j]) to the stack. d. Execute the instruction (STORE I32 ?(8) x $memarg0()). - e. Push the value (at.CONST (i + 1)) to the stack. - f. Push the value (I32.CONST (j + 1)) to the stack. + e. Push the value (at.CONST $iadd_($size(at), i, 1)) to the stack. + f. Push the value (I32.CONST $iadd_(32, j, 1)) to the stack. g. Push the value (I32.CONST (n - 1)) to the stack. h. Execute the instruction (MEMORY.INIT x y). @@ -32998,11 +34406,14 @@ 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'*). @@ -33951,10 +35362,12 @@ 3. Return $bool(($signed_(N, i_1) >= $signed_(N, i_2))). lpacknum_ lanetype c -1. If lanetype is numtype, then: +1. If lanetype is Inn, then: a. Return c. -2. Assert: Due to validation, lanetype is packtype. -3. Return $wrap__($size($lunpack(lanetype)), $psize(lanetype), c). +2. If lanetype is Fnn, then: + a. Return c. +3. Assert: Due to validation, lanetype is packtype. +4. Return $wrap__($size($lunpack(lanetype)), $psize(lanetype), c). cpacknum_ storagetype c 1. If storagetype is consttype, then: @@ -33963,10 +35376,12 @@ 3. Return $wrap__($size($lunpack(storagetype)), $psize(storagetype), c). lunpacknum_ lanetype c -1. If lanetype is numtype, then: +1. If lanetype is Inn, then: a. Return c. -2. Assert: Due to validation, lanetype is packtype. -3. Return $extend__($psize(lanetype), $size($lunpack(lanetype)), U, c). +2. If lanetype is Fnn, then: + a. Return c. +3. Assert: Due to validation, lanetype is packtype. +4. Return $extend__($psize(lanetype), $size($lunpack(lanetype)), U, c). cunpacknum_ storagetype c 1. If storagetype is consttype, then: @@ -34118,7 +35533,7 @@ b. If (lanetype is Fnn /\ vcvtop__ is some CONVERT), then: 1) Return ?(). 2. Assert: Due to validation, lanetype' is Fnn. -3. If lanetype is Jnn, then: +3. If lanetype is Inn, then: a. If vcvtop__ is some TRUNC_SAT, then: 1) Let (TRUNC_SAT sx zero?) be vcvtop__. 2) Return zero?. @@ -34141,7 +35556,7 @@ 1) Let (CONVERT half? sx) be vcvtop__. 2) Return half?. 2. Assert: Due to validation, lanetype' is Fnn. -3. If lanetype is Jnn, then: +3. If lanetype is Inn, then: a. If vcvtop__ is some TRUNC_SAT, then: 1) Return ?(). b. If vcvtop__ is some RELAXED_TRUNC, then:
diff --git a/spectec/test-splice/TEST.md b/spectec/test-splice/TEST.md index 693d74c..72f3591 100644 --- a/spectec/test-splice/TEST.md +++ b/spectec/test-splice/TEST.md
@@ -391,7 +391,6 @@ warning: syntax `labelidx` was never spliced warning: syntax `lane_` was never spliced warning: syntax `lane_` was never spliced -warning: syntax `lane_` was never spliced warning: syntax `laneidx` was never spliced warning: syntax `lanetype` was never spliced warning: syntax `list` was never spliced