Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit ebb56a5

Browse files
authored
Fixes the typing rule of CAUGHTadm (#244)
* Fixes the typing rule of CAUGHTadm as suggested in: #229 (comment) * Applying suggestion from PR #241 https://github.com/WebAssembly/exception-handling/pull/241/files/201ff276be6c458e7a819662eb2862bd475f2fcd..f97c9d108a999c3c3fd30f25554a113822bed1b8#r1030097793 * Applied suggestions from code review, fixed notation, also adding the missing _n to CAUGHTadm. The subscript is introduced by the changes in PR #226
1 parent 3177fbc commit ebb56a5

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

document/core/appendix/properties.rst

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -675,31 +675,35 @@ To that end, all previous typing judgements :math:`C \vdash \X{prop}` are genera
675675
676676
.. index:: caught, throw context
677677

678-
:math:`\CAUGHTadm\{\tagaddr~\val^\ast\}~\instr^\ast~\END`
679-
.........................................................
678+
:math:`\CAUGHTadm_n\{\tagaddr~\val^\ast\}~\instr^\ast~\END`
679+
...........................................................
680680

681681
* The :ref:`external tag value <syntax-externval>` :math:`\EVTAG~\tagaddr` must be :ref:`valid <valid-externval-tag>` with some :ref:`external tag type <syntax-externtype>` :math:`\ETTAG~[t_0^\ast] \to []`.
682682

683683
* The :ref:`values <syntax-val>` :math:`\val^\ast` must be of type :math:`[t_0^\ast]`.
684684

685-
* Let :math:`C'` be the same :ref:`context <context>` as :math:`C`, but with the label :math:`(\LCATCH~[t^\ast])` prepended to the |CLABELS| vector.
685+
* The label :math:`C.\CLABELS[0]` must be defined in the context.
686686

687-
* Under context :math:`C'`,
688-
the instruction sequence :math:`\instr^\ast` must be :ref:`valid <valid-instr-seq>` with type :math:`[] \to [t^\ast]`.
687+
* Let :math:`(\LCATCH^?~[t^n])` be the :ref:`label type <syntax-labeltype>` :math:`C.\CLABELS[0]`.
688+
689+
* The |LCATCH| must not be present in the label type :math:`C.\CLABELS[0]`.
689690

690-
* Let :math:`C''` be the same :ref:`context <context>` as :math:`C`, but with the label :math:`[t^\ast]` prepended to the |CLABELS| vector.
691+
* Let :math:`C''` be the same :ref:`context <context>` as :math:`C`, but with the label type :math:`(\LCATCH~[t^n])` replacing the first element of the |CLABELS| vector.
691692

692-
* Then the compound instruction is valid under context :math:`C''` with type :math:`[] \to [t^\ast]`.
693+
* Under context :math:`C''`,
694+
the instruction sequence :math:`\instr^\ast` must be :ref:`valid <valid-instr-seq>` with type :math:`[] \to [t^n]`.
695+
696+
* Then the compound instruction is valid with type :math:`[] \to [t^n]`.
693697

694698
.. math::
695699
\frac{
696700
S \vdashexternval \EVTAG~\tagaddr : \ETTAG~[t_0^\ast]\to[]
697701
\qquad
698702
(val : t_0)^\ast
699703
\qquad
700-
S; C,\CLABELS\,(\LCATCH~[t^\ast]) \vdashinstrseq \instr^\ast : [] \to [t^\ast]
704+
S; C',\CLABELS\,(\LCATCH~[t^n]) \vdashinstrseq \instr^\ast : [] \to [t^n]
701705
}{
702-
S; C,\CLABELS\,[t^\ast] \vdashadmininstr \CAUGHTadm\{\tagaddr~\val^\ast\}~\instr^\ast~\END : [] \to [t^\ast]
706+
S; C',\CLABELS\,[t^n] \vdashadmininstr \CAUGHTadm_n\{\tagaddr~\val^\ast\}~\instr^\ast~\END : [] \to [t^n]
703707
}
704708
705709

0 commit comments

Comments
 (0)