-
Notifications
You must be signed in to change notification settings - Fork 534
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
fix: segfault in old compiler due to noConfusion assumptions #2903
Conversation
I took the liberty to make the PR title more explicit, it helps at least me when looking at notifications. I hope that doesn't step on anyone's toes. |
|
will this go to 4.4 or nightly ? |
@nrolland, when this is merged it will land in the nightly releases. It will then be rolled out as part of |
Ping on this old PR. |
Rebased to make sure there are no interactions with recent changes. |
This fixes #2901, a bug in the old compiler which causes a segfault. The issue is that when visiting
noConfusion
applications, it assumes that each constructor case hasnfields
arguments, e.g.head1 = head2 -> tail1 = tail2 -> P
has two arguments becauseList.cons
has 2 fields, but in fact propositional fields are skipped by the noConfusion type generator, so for exampleSubtype.noConfusionType
is:where
val = val_1 → P
only has the one argument even thoughSubtype.mk
has two fields, presumably because it is useless to have an equality of propositions. Unfortunately there isn't any easy cache or getter to use here to get the number of non-propositional fields, so we just calculate it on the spot.