Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
Merged
Changes from 4 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
27 changes: 25 additions & 2 deletions document/core/appendix/properties.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,31 @@ Results
S \vdashresult \TRAP : [t^\ast]
}

.. todo::
Add validation for exception results.

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

* The :ref:`external value <syntax-externval>` :math:`\EVTAG~\tagaddr` must be :ref:`valid <valid-externval-tag>` with some :ref:`external type <syntax-externtype>` :math:`\ETTAG~\tagtype`.

* Let :math:`[t^\ast]\to[t_0^\ast]` be the :ref:`tag type <syntax-tagtype>` |tagtype|.

* Assert: due to :ref:`validation <valid-externval-tag>` the type sequence :math:`t_0^\ast` must be empty.
Copy link
Member

Choose a reason for hiding this comment

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

This isn't actually an assertion -- this rule is the very one that validates this property for results. ;)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Doesn't the first line (L.65) do this validation?

  • The :ref:external value <syntax-externval> :math:\EVTAG~\tagaddr must be :ref:valid <valid-externval-tag> with some :ref:external type <syntax-externtype> :math:\ETTAG~\tagtype.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I guess that's the justification, so removing the "Assert:"


* For each :ref:`value <syntax-val>` :math:`\val_i` in :math:`\val^\ast`:

* 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