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

Fixes the typing rule of CAUGHTadm - #244

Merged
ioannad merged 4 commits into
WebAssembly:mainfrom
ioannad:fix-CAUGHTadm-typing
Feb 15, 2023
Merged

ioannad merged 4 commits into
WebAssembly:mainfrom
ioannad:fix-CAUGHTadm-typing

Conversation

@ioannad

@ioannad ioannad commented Nov 25, 2022

Copy link
Copy Markdown
Collaborator

Addresses review comment on merged #229:
#229 (comment)

Fixes the typing rule of CAUGHTadm as suggested in:
WebAssembly#229 (comment)
@ioannad

ioannad commented Nov 25, 2022

Copy link
Copy Markdown
Collaborator Author

I just realised there are some more comments on this in open PR #241, which I will address in this PR (tomorrow). I will make all changes to the typing of CAUGHTadm here, because they don't fit in #241.

ioannad added a commit to ioannad/exception-handling that referenced this pull request Nov 26, 2022
Changes to this rule are now done in PR WebAssembly#244

@rossberg rossberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM modulo suggestions.

Comment thread document/core/appendix/properties.rst Outdated
Comment on lines +683 to +685
* Let :math:`C'` be the same :ref:`context <context>` as :math:`C`, but with the first label popped from the |CLABELS| vector.

* Let :math:`C''` be the same :ref:`context <context>` as :math:`C`, but with the label :math:`[t^\ast]` prepended to the |CLABELS| vector.
* Let :math:`C''` be the same :ref:`context <context>` as :math:`C'`, but with the label type :math:`(\LCATCH~[t^\ast])` prepended to the |CLABELS| vector.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think you can merge these:

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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

For some reason I couldn't apply the suggestions but I added these changes to the latest commit I just pushed.

Comment thread document/core/appendix/properties.rst Outdated
S; C',\CLABELS\,(\LCATCH~[t^\ast]) \vdashinstrseq \instr^\ast : [] \to [t^\ast]
}{
S; C,\CLABELS\,[t^\ast] \vdashadmininstr \CAUGHTadm\{\tagaddr~\val^\ast\}~\instr^\ast~\END : [] \to [t^\ast]
S; C',\CLABELS\,(\LCATCH^?~[t^\ast]) \vdashadmininstr \CAUGHTadm\{\tagaddr~\val^\ast\}~\instr^\ast~\END : [] \to [t^\ast]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think we can or want to allow this to be a catch label beforehand already.

Suggested change
S; C',\CLABELS\,(\LCATCH^?~[t^\ast]) \vdashadmininstr \CAUGHTadm\{\tagaddr~\val^\ast\}~\instr^\ast~\END : [] \to [t^\ast]
S; C',\CLABELS\,[t^\ast] \vdashadmininstr \CAUGHTadm\{\tagaddr~\val^\ast\}~\instr^\ast~\END : [] \to [t^\ast]

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Same as above

ioannad added a commit that referenced this pull request Dec 23, 2022
#241)

This addresses additional review comments to PR #222, that were made after it was merged.
The last review comment in the discussion suggests to adjust all validation labels to use label types instead of just result types.
Should address all occurrences of validation labels.

Additionally adds a boolean catch_label to control frames in the validation algorithm,
and some related functionality, fixing the cases for opcodes `catch` and `catch_all`.

* Apply suggestions from code review

Co-authored-by: Andreas Rossberg <[email protected]>
Co-authored-by: Heejin Ahn <[email protected]>

* Reverting changes to typing of CAUGHTadm.

Changes to this rule are now done in PR #244
ioannad added a commit to ioannad/exception-handling that referenced this pull request Feb 15, 2023
In particular:
- Switched to
    handler ::= (tagaddr? instr*)* | labelidx
    exn ::= tagaddr val*
    instr ::= … | handler_n{handler} instr* end | caught_n{exn} instr* end
  removing DELEGATEadm
- Changed prose to just push and pop handlers and exceptions, in the runtime,
  in the execution steps of the instructions, in the formal overview,
  and partly in appendix/properties.

Not done:
- Did not change the notation and prose for CAUGHTadm
  in appendix/properties.rst, this will be done in PR WebAssembly#244.
ioannad and others added 2 commits February 15, 2023 17:15
- Also added the missing _n to CAUGHTadm.
  The subscript is introduced by the changes in PR WebAssembly#226
@ioannad

ioannad commented Feb 15, 2023

Copy link
Copy Markdown
Collaborator Author

Applied the suggestions manually, it seemed impossible otherwise. Merging.

@ioannad
ioannad merged commit ebb56a5 into WebAssembly:main Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants