diff --git a/document/core/appendix/properties.rst b/document/core/appendix/properties.rst index 299d083295..0dd2774e15 100644 --- a/document/core/appendix/properties.rst +++ b/document/core/appendix/properties.rst @@ -1013,7 +1013,7 @@ To that end, all previous typing judgements :math:`C \vdash \X{prop}` are genera .. math:: \frac{ - C \vdashresulttype [t^n] : \OKresulttype + \{\} \vdashresulttype [t^n] : \OKresulttype \qquad S; [t^n] \vdashinstrs F; \instr^\ast : [t^n] }{ @@ -1037,10 +1037,10 @@ To that end, all previous typing judgements :math:`C \vdash \X{prop}` are genera \begin{array}{c} (C \vdashcatch \catch : \OKcatch)^\ast \qquad - S; C \vdashinstrs \instr^\ast : [t_1^\ast] \to [t_2^\ast] \\ + S; C \vdashinstrs \instr^\ast : [] \to [t^\ast] \\ \end{array} }{ - S; C \vdashadmininstr \HANDLER_n\{\catch^\ast\}~\instr^\ast : [t_1^\ast] \to [t_2^\ast] + S; C \vdashadmininstr \HANDLER_n\{\catch^\ast\}~\instr^\ast : [] \to [t^\ast] } diff --git a/specification/wasm-3.0/7.1-soundness.configurations.spectec b/specification/wasm-3.0/7.1-soundness.configurations.spectec index 055fb5f324..63bbd7d97b 100644 --- a/specification/wasm-3.0/7.1-soundness.configurations.spectec +++ b/specification/wasm-3.0/7.1-soundness.configurations.spectec @@ -24,6 +24,7 @@ rule Instr_ok2/frame: s; C |- FRAME_ n `{f} instr* : eps -> t^n -- Frame_ok: s |- f : C' -- Expr_ok2: s; C' |- instr* : t^n + -- Resulttype_ok: {} |- t^n : OK rule Instr_ok2/handler: s; C |- HANDLER_ n `{catch*} instr* : eps -> t* diff --git a/specification/wasm-latest/7.1-soundness.configurations.spectec b/specification/wasm-latest/7.1-soundness.configurations.spectec index 055fb5f324..63bbd7d97b 100644 --- a/specification/wasm-latest/7.1-soundness.configurations.spectec +++ b/specification/wasm-latest/7.1-soundness.configurations.spectec @@ -24,6 +24,7 @@ rule Instr_ok2/frame: s; C |- FRAME_ n `{f} instr* : eps -> t^n -- Frame_ok: s |- f : C' -- Expr_ok2: s; C' |- instr* : t^n + -- Resulttype_ok: {} |- t^n : OK rule Instr_ok2/handler: s; C |- HANDLER_ n `{catch*} instr* : eps -> t* diff --git a/spectec/test-frontend/TEST.md b/spectec/test-frontend/TEST.md index 66bf13eeca..4e16645b24 100644 --- a/spectec/test-frontend/TEST.md +++ b/spectec/test-frontend/TEST.md @@ -8229,44 +8229,45 @@ relation Instr_ok2: `%;%|-%:%`(store, context, instr, instrtype) -- 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:23.1-26.37 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:23.1-27.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') -- Expr_ok2: `%;%|-%:%`(s, C', instr*{instr <- `instr*`}, `%`_resulttype(t^n{t <- `t*`})) + -- Resulttype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%`_resulttype(t^n{t <- `t*`})) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:28.1-31.49 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:29.1-32.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:33.1-35.42 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:34.1-36.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:38.1-39.27 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:39.1-40.27 rule empty{s : store, C : context}: `%;%|-%:%`(s, C, [], `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:41.1-45.86 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:42.1-46.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_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*`}))) -- Instr_ok2: `%;%|-%:%`(s, C, 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:47.1-51.33 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:48.1-52.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:54.1-57.33 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:55.1-58.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*`}))) @@ -8274,7 +8275,7 @@ relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) ;; ../../../../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:60.1-62.44 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:61.1-63.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*`}))) @@ -8350,30 +8351,30 @@ relation Exninst_ok: `%|-%:OK`(store, exninst) ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec rec { -;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:208.1-209.50 +;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:209.1-210.50 relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:222.1-225.35 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:223.1-226.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:227.1-230.20 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:228.1-231.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:232.1-234.42 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:233.1-235.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:236.1-237.44 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:237.1-238.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:239.1-240.28 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:240.1-241.28 rule `ref.extern`{ref : ref, s : store}: `%>>_%%`(`REF.EXTERN`_fieldval(ref), s, (ref : ref <: fieldval)) } diff --git a/spectec/test-latex/TEST.md b/spectec/test-latex/TEST.md index 5734cf0610..d9d6c71bbb 100644 --- a/spectec/test-latex/TEST.md +++ b/spectec/test-latex/TEST.md @@ -14153,6 +14153,8 @@ $$ s \vdash f : {C'} \qquad s ; {C'} \vdash {{\mathit{instr}}^\ast} : {t^{n}} + \qquad +\{ \} \vdash {t^{n}} : \mathsf{ok} }{ s ; C \vdash {{\mathsf{frame}}_{n}}{\{ f \}}~{{\mathit{instr}}^\ast} : \epsilon \rightarrow {t^{n}} } \, {[\textsc{\scriptsize Instr\_ok2{-}frame}]} diff --git a/spectec/test-middlend/TEST.md b/spectec/test-middlend/TEST.md index b8b959fd83..793a192b74 100644 --- a/spectec/test-middlend/TEST.md +++ b/spectec/test-middlend/TEST.md @@ -7752,44 +7752,45 @@ relation Instr_ok2: `%;%|-%:%`(store, context, instr, instrtype) -- 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:23.1-26.37 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:23.1-27.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') -- Expr_ok2: `%;%|-%:%`(s, C', instr*{instr <- `instr*`}, `%`_resulttype(t^n{t <- `t*`})) + -- Resulttype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%`_resulttype(t^n{t <- `t*`})) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:28.1-31.49 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:29.1-32.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:33.1-35.42 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:34.1-36.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:38.1-39.27 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:39.1-40.27 rule empty{s : store, C : context}: `%;%|-%:%`(s, C, [], `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:41.1-45.86 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:42.1-46.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_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*`}))) -- Instr_ok2: `%;%|-%:%`(s, C, 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:47.1-51.33 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:48.1-52.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:54.1-57.33 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:55.1-58.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*`}))) @@ -7797,7 +7798,7 @@ relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) ;; ../../../../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:60.1-62.44 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:61.1-63.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*`}))) @@ -7873,30 +7874,30 @@ relation Exninst_ok: `%|-%:OK`(store, exninst) ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec rec { -;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:208.1-209.50 +;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:209.1-210.50 relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:222.1-225.35 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:223.1-226.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:227.1-230.20 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:228.1-231.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:232.1-234.42 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:233.1-235.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:236.1-237.44 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:237.1-238.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:239.1-240.28 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:240.1-241.28 rule `ref.extern`{ref : ref, s : store}: `%>>_%%`(`REF.EXTERN`_fieldval(ref), s, (ref : ref <: fieldval)) } @@ -19604,44 +19605,45 @@ relation Instr_ok2: `%;%|-%:%`(store, context, instr, instrtype) -- 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:23.1-26.37 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:23.1-27.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') -- Expr_ok2: `%;%|-%:%`(s, C', instr*{instr <- `instr*`}, `%`_resulttype(t^n{t <- `t*`})) + -- Resulttype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%`_resulttype(t^n{t <- `t*`})) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:28.1-31.49 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:29.1-32.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:33.1-35.42 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:34.1-36.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:38.1-39.27 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:39.1-40.27 rule empty{s : store, C : context}: `%;%|-%:%`(s, C, [], `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:41.1-45.86 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:42.1-46.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_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*`}))) -- Instr_ok2: `%;%|-%:%`(s, C, 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:47.1-51.33 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:48.1-52.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:54.1-57.33 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:55.1-58.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*`}))) @@ -19649,7 +19651,7 @@ relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) ;; ../../../../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:60.1-62.44 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:61.1-63.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*`}))) @@ -19725,30 +19727,30 @@ relation Exninst_ok: `%|-%:OK`(store, exninst) ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec rec { -;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:208.1-209.50 +;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:209.1-210.50 relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:222.1-225.35 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:223.1-226.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:227.1-230.20 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:228.1-231.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:232.1-234.42 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:233.1-235.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:236.1-237.44 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:237.1-238.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:239.1-240.28 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:240.1-241.28 rule `ref.extern`{ref : ref, s : store}: `%>>_%%`(`REF.EXTERN`_fieldval(ref), s, (ref : ref <: fieldval)) } @@ -31651,30 +31653,31 @@ relation Instr_ok2: `%;%|-%:%`(store, context, instr, instrtype) -- 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:23.1-26.37 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:23.1-27.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') -- Expr_ok2: `%;%|-%:%`(s, C', instr*{instr <- `instr*`}, `%`_resulttype(t^n{t <- `t*`})) + -- Resulttype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, `%`_resulttype(t^n{t <- `t*`})) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:28.1-31.49 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:29.1-32.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:33.1-35.42 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:34.1-36.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:38.1-39.27 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:39.1-40.27 rule empty{s : store, C : context}: `%;%|-%:%`(s, C, [], `%->_%%`_instrtype(`%`_resulttype([]), [], `%`_resulttype([]))) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:41.1-45.86 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:42.1-46.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_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*`}))) -- Instr_ok2: `%;%|-%:%`(s, C, instr_1, `%->_%%`_instrtype(`%`_resulttype(t_1*{t_1 <- `t_1*`}), x_1*{x_1 <- `x_1*`}, `%`_resulttype(t_2*{t_2 <- `t_2*`}))) @@ -31684,14 +31687,14 @@ relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) -- (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:47.1-51.33 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:48.1-52.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:54.1-57.33 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:55.1-58.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*`}))) @@ -31699,7 +31702,7 @@ relation Instrs_ok2: `%;%|-%:%`(store, context, instr*, instrtype) ;; ../../../../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:60.1-62.44 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:61.1-63.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*`}))) @@ -31778,15 +31781,15 @@ relation Exninst_ok: `%|-%:OK`(store, exninst) ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec rec { -;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:208.1-209.50 +;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:209.1-210.50 relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:222.1-225.35 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:223.1-226.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:227.1-230.20 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:228.1-231.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|) @@ -31795,20 +31798,20 @@ relation ImmutReachable: `%>>_%%`(fieldval, store, fieldval) -- if (i < |ft*{ft <- `ft*`}|) -- if (ft*{ft <- `ft*`}[i] = `%%`_fieldtype(?(), zt)) - ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:232.1-234.42 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:233.1-235.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:236.1-237.44 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:237.1-238.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:239.1-240.28 + ;; ../../../../specification/wasm-latest/7.1-soundness.configurations.spectec:240.1-241.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 ec0313651c..03b84d235e 100644 --- a/spectec/test-prose/TEST.md +++ b/spectec/test-prose/TEST.md @@ -17983,6 +17983,8 @@ The frame :math:`\{ \mathsf{locals}~{({{\mathit{val}}^?})^\ast},\;\allowbreak \m * The frame :math:`f` is :ref:`valid ` with the context :math:`{C'}`. * :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 `. * Or: * The instruction :math:`{\mathit{instr}}` is of the form :math:`({{\mathsf{handler}}_{n}}{\{}~{{\mathit{catch}}^\ast}~\}~{{\mathit{instr}''}^\ast})`. @@ -18040,6 +18042,8 @@ The frame :math:`\{ \mathsf{locals}~{({{\mathit{val}}^?})^\ast},\;\allowbreak \m * :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 `. + @@ -29764,6 +29768,7 @@ Instr_ok2 - localidx* is []. - the frame f is valid with the context C'. - instr''* is valid with valtype'^n. + - Under the context { RETURN: ?() }, the result type valtype'^n is valid. - Or: - instr is (HANDLER_ n { catch* } instr''*). - valtype* is []. @@ -29793,6 +29798,7 @@ Instr_ok2/frame - (FRAME_ n { f } instr*) is valid with [] -> t^n if: - the frame f is valid with the context C'. - instr* is valid with t^n. + - Under the context { RETURN: ?() }, the result type t^n is valid. Instr_ok2/handler - (HANDLER_ n { catch* } instr*) is valid with [] -> t* if: