Remove T_abs with (Path = T_sub) and add T_abs & T_sub syntax...#19
Open
polytypic wants to merge 2 commits into
Open
Remove T_abs with (Path = T_sub) and add T_abs & T_sub syntax...#19polytypic wants to merge 2 commits into
T_abs with (Path = T_sub) and add T_abs & T_sub syntax...#19polytypic wants to merge 2 commits into
Conversation
4a4c30a to
229896c
Compare
aff9b3e to
7845dd3
Compare
1d77593 to
b248d00
Compare
7845dd3 to
604881f
Compare
604881f to
5fc4f42
Compare
5fc4f42 to
ea353d3
Compare
6167f5b to
88b09cf
Compare
ea353d3 to
2268faa
Compare
e909120 to
afd4d23
Compare
0fb0880 to
5c75b59
Compare
79a1bc8 to
4fbd995
Compare
43f4894 to
c3c1c90
Compare
4fbd995 to
dcfa560
Compare
15e8112 to
8782d47
Compare
8782d47 to
25ee61f
Compare
25ee61f to
9dba1f2
Compare
6118930 to
08bacfc
Compare
9dba1f2 to
11ef5ea
Compare
1d9fde6 to
a3670c2
Compare
a3670c2 to
4c52f17
Compare
2cd76cf to
06a9f97
Compare
4c52f17 to
e0b0e3b
Compare
e0b0e3b to
fd0fcca
Compare
fd0fcca to
cd5b854
Compare
cd5b854 to
1345d70
Compare
...for type refinement.
The new
T_abs & T_sub
mechanism is similar to the old
T_abs with (Path = T_sub)
mechanism and also to the include mechanism
{...T_abs; ...T_sub}
The main difference is that, instead of using a path to target a specific
substructure or requiring that no declarations overlap, an intersection,
`T_int`, of the nested declarations of `T_abs` and `T_sub`, is computed.
Then it is checked whether `T_abs :> T_int` and if so a substitution, `𝛿`, is
obtained. Finally the nested declarations of `𝛿(T_abs)` and `T_sub` are merged.
Also, in `T1 & T2` both `T1` and `T2` are elaborated in the same environment
whereas in `{...T1; ...T2}` the environment for `T2` includes declarations from
`T1` and in `T1 with (P = T2)` the path `P` is specific to `T1`.
When defined, `T1 & T2` is always a subtype of both `T1` and `T2`
T1 & T2 :> T1
T1 & T2 :> T2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Remove
T_abs with (Path = T_sub)and addT_abs & T_subsyntax for type refinement.The new
mechanism is similar to the old
mechanism and also to the include mechanism
The main difference is that, instead of using a path to target a specific substructure or requiring that no declarations overlap, an intersection,
T_int, of the nested declarations ofT_absandT_sub, is computed.Then it is checked whether
T_abs :> T_intand if so a substitution,𝛿, is obtained. Finally the nested declarations of𝛿(T_abs)andT_subare merged.Also, in
T1 & T2bothT1andT2are elaborated in the same environment whereas in{...T1; ...T2}the environment forT2includes declarations fromT1and inT1 with (P = T2)the pathPis specific toT1.When defined,
T1 & T2is always a subtype of bothT1andT2