Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
formal spec overview for the 3rd exception handling proposal #143
formal spec overview for the 3rd exception handling proposal #143
Changes from 4 commits
9c0c1a8
2dc31f8
57c41e5
51c360b
5a988d5
aafc4b1
4bb9f84
1afd21a
4ff1c38
fbe87b0
fa5a237
83872ed
4552306
8cfa1b6
7d122dd
d874fcd
c98ff33
72bf4f3
4606660
662343c
b12eec9
9b02deb
bb0a623
5457b7a
6f681ff
315fe15
219d92e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
You also modify the definition of
C
on line 46. Maybe move that here as well?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.
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 believe this should actually be
Otherwise, it would be referring to a different label than the original try-delegate.
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.
@rossberg: I think the +1 is missing because of the behaviour of "breaking inside the label". This way we also cover the case of delegating to the function body. WDYT?
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.
Are you sure? If you have
you'll reduce to
When you type this, the outer
label
adds an entry to the labels environment before you get to this typing rule, unlike with thetry-delegate
before the reduction. So you have to skip over that prior label in this rule.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.
@rossberg Apologies for the delay, last week ended up unexpectedly way too full.
Is it possible that the
+1
you're missing is hidden in thelabels [t*]
attached toC
in the other two judgements? The typing rule for try-delegate gives exactly the premises of this typing rule for adm.delegate, which in turn matches the typing for adm.label, to derive the type for that last expression in the end - I think.More concretely, if I'm not mistaken, in your question we have a derivation of
and because
try bt instr* delegate $l
reduces tolabel_n{} (delegate{$l} instr* end) end
we should be able to derive thatC ⊢ label_n{} (delegate{$l} instr* end) end : []→[t^n]
.If this is what you ask to show, then from the derivation of (1) we know the following.
By having (3) and (4) as the premises for the typing rule of adm.delegate we derive
which we can use as a premise to the typing rule for adm.label to get the desired
WDYT?
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.
The problem I see is that (4) is not the premise you'll need when arriving at the adm.delegate rule. Instead you'll need
with
C' = C, labels [t^n]
and somel'
, because that's the context you now enter the rule with. The only suitablel'
that allows you to prove this from (4) isl+1
, I believe.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.
If we change the current rule
to
meaning, if we put the label created by the try-delegate itself within the scope of
adm.delegate
, can this confusion be helped?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.
Continuing the discussion with a suggestion in #205 .