Row_like indexes allows to represent a range rather than only upward closed set#361
Open
chambart wants to merge 2 commits intoocaml-flambda:flambda2.0-stablefrom
Open
Row_like indexes allows to represent a range rather than only upward closed set#361chambart wants to merge 2 commits intoocaml-flambda:flambda2.0-stablefrom
chambart wants to merge 2 commits intoocaml-flambda:flambda2.0-stablefrom
Conversation
This allows to more precisely represent the join of two known cases
Gbury
reviewed
Mar 22, 2021
| | Range of { at_least : Index.t; at_most : Index.t; } | ||
| (** Range { at_least; at_most represents the set | ||
| { x | at_least \subset x /\ x \subset at_most } | ||
| or { x | at_least \subset x } if at_most is None |
There was a problem hiding this comment.
How can an index be None, from what I recall, Indexes can be integers at least in some cases...
Also, it's a bit weird to have this redundancy in how to represent at_least (i.e. either directly with At_least, or with Range using a None at_most), but no way to represent just the at_most case.
Author
There was a problem hiding this comment.
Oups I didn't update the comment. The case was
| Range of { at_least : Index.t; at_most : Index.t option; }
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.
This allows to more precisely represent the size of joins of polymorphic variants. This would be useful to be able to unbox something like:
Notice that this is not enough to allow simplification of
cto2here. Join still considers that joining between a known case and an absent case is equivalent to joining with top, where it should be equivalent to joining with bottom. We would need to refactor a bit to do that, which I defer for later.In a first version the
Rangeconstructor took an option for theat_mostfield rather than having anAt_leastandRangecase. But there is no factorisation to gain that way and the code is a bit cleaner like that.