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
Fixing yet a source of dependency on alphabetic order in unification. #7257
Fixing yet a source of dependency on alphabetic order in unification. #7257
Conversation
652437a
to
6c5f948
Compare
6c5f948
to
ee912f7
Compare
ee912f7
to
bda4019
Compare
@mattam82: is it asking you a lot to review this PR considering your schedule? |
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.
Looks good to me. Removing the choose function and rather returning the ordered list of possible projections makes the algorithm much clearer I think. I suppose the Notations.out change is unrelated right?
bda4019
to
21a9b15
Compare
It is not unrelated. This was a case where the inference of the return predicate was dependent on the names of variables. The change in I added a note in I also removed the UniMath overlay, since this has been merged upstream. PS: Thanks for the review. |
21a9b15
to
0322575
Compare
@herbelin Are the CI failures related? Otherwise, can you rebase on a fresh master to check that everything is OK? |
Probably. No visibility though on when I can work on it. |
0322575
to
2245419
Compare
Note in passing: |
Note for myself: VST failing on a change of unification in the following (simplified) example: Goal forall n, n = 0 -> exists p, p = n /\ p = 0.
intros. eexists ?[p]. split. rewrite H.
reflexivity. Added: now fixed. |
2245419
to
a10cfdf
Compare
@ CI experts: cross-crypto has an instance of unification which depends on the ASCII order, and which this PR fixes. The incompatibility is in the submodule FCF. Is there a way to make an overlay for a submodule or do I need instead to let upstream FCF first merge the (backwards-compatible) fix I made? |
You can make an overlay updating the submodule but it's probably easier
to just let them merge.
Gaëtan Gilbert
…On 14/09/2018 10:44, Hugo Herbelin wrote:
@ CI experts: cross-crypto has an instance of unification which depends
on the ASCII order, and which this PR fixes. The incompatibility is in
the submodule FCF. Is there a way to make an overlay for a submodule or
do I need instead to let upstream FCF first merge the
(backwards-compatible) fix
<https://github.com/herbelin/fcf/tree/master%2Bfix-coq7257-ascii-sensitive-unification>
I made?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#7257 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACWQ7B4fJgKn9C3Lrn6WvXUmAbN2PB6oks5ua2yIgaJpZM4TVfC9>.
|
@SkySkimmer: I went towards submitting a PR to FCF. If it takes too long, I'll do an overlay of cross-crypto linking to my own version of the submodule. Thanks! |
This refines even further c24bcae (PR coq#924) and 6304c84: - c24bcae fixed the order in the heuristic - 6304c84 improved the order by preferring projections There remained a dependency in the alphabetic order in selecting unification candidates. The current commit fixes it. We radically change the representation of the substitution to invert by using a map indexed on the rank in the signature rather than on the name of the variable. More could be done to use numbers further, e.g. for representing aliases. Note that this has consequences on the test-suite (in output/Notations.v) as some problems now infer a dependent return clause.
a10cfdf
to
99ffdbb
Compare
Finally, I made an overlay to cross-crypto to tell it which HEAD of FCF to get. Should I submit a PR to cross-crypto just for that or can I expect that cross-crypto updates the head of its submodule automatically? Added: never mind, I saw that the last commit to cross-crypto was a submodule update, so I submitted a PR. |
Overlays merged upstream. Seems ready. |
Kind: bug fix
Fixes #7256, refining c24bcae (PR #924) and 6304c84:
choose
flagThere remained a dependency in the alphabetic order in selecting unification candidates. This PR fixes it by radically changing the representation of the substitution to invert, using a map indexed on the rank in the signature rather than on the name of the variable. Note that more could be done to use numbers further, e.g. for representing aliases (but not a priority at the moment).
Added note: The fix seems to break things elsewhere. To be investigated.This PR now depends on PR #7274 for the compilation of the test-suite.(Updated 28 July 2018)