Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions specification/wasm-3.0/4.1-execution.values.spectec
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,5 @@ rule Externaddr_ok/func:
rule Externaddr_ok/sub:
s |- externaddr : xt
-- Externaddr_ok: s |- externaddr : xt'
-- Externtype_ok: {} |- xt : OK
-- Externtype_sub: {} |- xt' <: xt
1 change: 1 addition & 0 deletions specification/wasm-latest/4.1-execution.values.spectec
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,5 @@ rule Externaddr_ok/func:
rule Externaddr_ok/sub:
s |- externaddr : xt
-- Externaddr_ok: s |- externaddr : xt'
-- Externtype_ok: {} |- xt : OK
-- Externtype_sub: {} |- xt' <: xt
3 changes: 2 additions & 1 deletion spectec/test-frontend/TEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -6450,10 +6450,11 @@ relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype)
`%|-%:%`(s, FUNC_externaddr(a), FUNC_externtype((funcinst.TYPE_funcinst : deftype <: typeuse)))
-- if (s.FUNCS_store[a] = funcinst)

;; ../../../../specification/wasm-latest/4.1-execution.values.spectec:126.1-129.37
;; ../../../../specification/wasm-latest/4.1-execution.values.spectec:126.1-130.37
rule sub{s : store, externaddr : externaddr, xt : externtype, xt' : externtype}:
`%|-%:%`(s, externaddr, xt)
-- Externaddr_ok: `%|-%:%`(s, externaddr, xt')
-- Externtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt)
-- Externtype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt', xt)
}

Expand Down
2 changes: 2 additions & 0 deletions spectec/test-latex/TEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -9696,6 +9696,8 @@ $$
\frac{
s \vdash {\mathit{externaddr}} : {\mathit{xt}'}
\qquad
\{ \} \vdash {\mathit{xt}} : \mathsf{ok}
\qquad
\{ \} \vdash {\mathit{xt}'} \leq {\mathit{xt}}
}{
s \vdash {\mathit{externaddr}} : {\mathit{xt}}
Expand Down
9 changes: 6 additions & 3 deletions spectec/test-middlend/TEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -5973,10 +5973,11 @@ relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype)
`%|-%:%`(s, FUNC_externaddr(a), FUNC_externtype((funcinst.TYPE_funcinst : deftype <: typeuse)))
-- if (s.FUNCS_store[a] = funcinst)

;; ../../../../specification/wasm-latest/4.1-execution.values.spectec:126.1-129.37
;; ../../../../specification/wasm-latest/4.1-execution.values.spectec:126.1-130.37
rule sub{s : store, externaddr : externaddr, xt : externtype, xt' : externtype}:
`%|-%:%`(s, externaddr, xt)
-- Externaddr_ok: `%|-%:%`(s, externaddr, xt')
-- Externtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt)
-- Externtype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt', xt)
}

Expand Down Expand Up @@ -17824,10 +17825,11 @@ relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype)
`%|-%:%`(s, FUNC_externaddr(a), FUNC_externtype((funcinst.TYPE_funcinst : deftype <: typeuse)))
-- if (s.FUNCS_store[a] = funcinst)

;; ../../../../specification/wasm-latest/4.1-execution.values.spectec:126.1-129.37
;; ../../../../specification/wasm-latest/4.1-execution.values.spectec:126.1-130.37
rule sub{s : store, externaddr : externaddr, xt : externtype, xt' : externtype}:
`%|-%:%`(s, externaddr, xt)
-- Externaddr_ok: `%|-%:%`(s, externaddr, xt')
-- Externtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt)
-- Externtype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt', xt)
}

Expand Down Expand Up @@ -29813,10 +29815,11 @@ relation Externaddr_ok: `%|-%:%`(store, externaddr, externtype)
-- if (a < |s.FUNCS_store|)
-- if (s.FUNCS_store[a] = funcinst)

;; ../../../../specification/wasm-latest/4.1-execution.values.spectec:126.1-129.37
;; ../../../../specification/wasm-latest/4.1-execution.values.spectec:126.1-130.37
rule sub{s : store, externaddr : externaddr, xt : externtype, xt' : externtype}:
`%|-%:%`(s, externaddr, xt)
-- Externaddr_ok: `%|-%:%`(s, externaddr, xt')
-- Externtype_ok: `%|-%:OK`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt)
-- Externtype_sub: `%|-%<:%`({TYPES [], TAGS [], GLOBALS [], MEMS [], TABLES [], FUNCS [], DATAS [], ELEMS [], LOCALS [], LABELS [], RETURN ?(), REFS [], RECS []}, xt', xt)
}

Expand Down
6 changes: 6 additions & 0 deletions spectec/test-prose/TEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -17769,6 +17769,8 @@ The external address :math:`{\mathit{externaddr}}` is :ref:`valid <valid-val>` w

* The external address :math:`{\mathit{externaddr}}` is :ref:`valid <valid-val>` with the external type :math:`{\mathit{xt}'}`.

* Under the context :math:`\{ \mathsf{return}~\epsilon \}`, the external type :math:`{\mathit{externtype}}` is :ref:`valid <valid-val>`.

* The external type :math:`{\mathit{xt}'}` :ref:`matches <match>` the external type :math:`{\mathit{externtype}}`.


Expand Down Expand Up @@ -17829,6 +17831,8 @@ The external address :math:`{\mathit{externaddr}}` is :ref:`valid <valid-val>` w

* The external address :math:`{\mathit{externaddr}}` is :ref:`valid <valid-val>` with the external type :math:`{\mathit{xt}'}`.

* Under the context :math:`\{ \mathsf{return}~\epsilon \}`, the external type :math:`{\mathit{xt}}` is :ref:`valid <valid-val>`.

* The external type :math:`{\mathit{xt}'}` :ref:`matches <match>` the external type :math:`{\mathit{xt}}`.


Expand Down Expand Up @@ -29767,6 +29771,7 @@ Externaddr_ok
- s.FUNCS[a] is funcinst.
- Or:
- externaddr is valid with the external type xt'.
- Under the context { RETURN: ?() }, externtype is valid.
- xt' matches externtype.

Externaddr_ok/tag
Expand Down Expand Up @@ -29797,6 +29802,7 @@ Externaddr_ok/func
Externaddr_ok/sub
- the external address externaddr is valid with the external type xt if:
- externaddr is valid with the external type xt'.
- Under the context { RETURN: ?() }, xt is valid.
- xt' matches xt.

Idctxt_ok
Expand Down
Loading