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

Adds validation for exception results. #254

Merged
merged 7 commits into from
Apr 21, 2023
Merged
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
23 changes: 21 additions & 2 deletions document/core/appendix/properties.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,27 @@ Results
S \vdashresult \TRAP : [t^\ast]
}

.. todo::
Add validation for exception results.

:ref:`Results <syntax-result>` :math:`\val^\ast~(\THROWadm~\tagaddr)`
.....................................................................

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

* For each :ref:`value <syntax-val>` :math:`\val_i` in :math:`\val^\ast` and corresponding :ref:`value type <syntax-valtype>` :math:`t_i` in :math:`t_i`:

* The value :math:`\val_i` must be :ref:`valid <valid-val>` with :ref:`value type <syntax-valtype>` :math:`t_i`.

* Then the result is valid with :ref:`result type <syntax-resulttype>` :math:`[{t'}^\ast]`, for any sequence :math:`{t'}^\ast` of :ref:`value types <syntax-valtype>`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a name clash, this is a different t'*.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed the first occurrence to t_0^\ast.



.. math::
\frac{
S \vdashexternval \EVTAG~\tagaddr : \ETTAG~[t^\ast] \to []
\qquad
(S \vdashval \val : t)^\ast
}{
S \vdashresult \val^\ast~(\THROWadm~\tagaddr) : [{t'}^\ast]
}


.. _module-context:
Expand Down