-
Notifications
You must be signed in to change notification settings - Fork 36
Add prose for typing rule of CAUGHTadm #229
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -646,14 +646,25 @@ To that end, all previous typing judgements :math:`C \vdash \X{prop}` are genera | |
:math:`\CAUGHTadm\{\tagaddr~\val^\ast\}~\instr^\ast~\END` | ||
......................................................... | ||
|
||
.. todo:: | ||
Add prose. | ||
* 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 []`. | ||
|
||
* The :ref:`values <syntax-val>` :math:`\val^\ast` must be of type :math:`[t_0^\ast]`. | ||
|
||
* 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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems wrong. Note that the typing rule requires that there already is a labeltype t* at the front of the labels (which you need to check!), and this is just adjusting it. |
||
|
||
* Under context :math:`C'`, | ||
the instruction sequence :math:`\instr^\ast` must be :ref:`valid <valid-instr-seq>` with type :math:`[] \to [t^\ast]`. | ||
|
||
* Let :math:`C''` be the same :ref:`context <context>` as :math:`C`, but with the label :math:`[t^\ast]` prepended to the |CLABELS| vector. | ||
|
||
* Then the compound instruction is valid under context :math:`C''` with type :math:`[] \to [t^\ast]`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I see, what you are trying. But the context C is an input, you cannot construct another one here. If there are constraints on it, those have to be checked. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rossberg, looking for past review comments I had forgotten I found this, which was the reason for the (still misplaced) change you found in PR#241. How should this prose and rule look like after all? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The prose needs to first check the topmost entry of its input context C, and then construct C' from it by updating that, and check the body under that C'. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
|
||
.. math:: | ||
\frac{ | ||
S \vdashexternval \EVTAG~\tagaddr : \ETTAG~[t'^\ast]\to[] | ||
S \vdashexternval \EVTAG~\tagaddr : \ETTAG~[t_0^\ast]\to[] | ||
\qquad | ||
(val : t')^\ast | ||
(val : t_0)^\ast | ||
\qquad | ||
S; C,\CLABELS\,(\LCATCH~[t^\ast]) \vdashinstrseq \instr^\ast : [] \to [t^\ast] | ||
}{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this isn't defined as written, and requires a loop over the individual values.