8000 Fix #5368: Canonical structure unification fails. by ppedrot · Pull Request #6436 · rocq-prover/rocq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix #5368: Canonical structure unification fails. #6436

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

Merged
merged 1 commit into from
Dec 18, 2017

Conversation

ppedrot
Copy link
Member
@ppedrot ppedrot commented Dec 15, 2017

Universe instances were lost during constructions of the canonical instance.

Universe instances were lost during constructions of the canonical instance.
@ppedrot ppedrot added the kind: fix This fixes a bug or incorrect documentation. label Dec 15, 2017
@Zimmi48 Zimmi48 added this to the 8.7.2 milestone Dec 15, 2017
@@ -218,6 +218,8 @@ let check_conv_record env sigma (t1,sk1) (t2,sk2) =
let t' = EConstr.of_constr t' in
let t' = subst_univs_level_constr subst t' in
let bs' = List.map (EConstr.of_constr %> subst_univs_level_constr subst) bs in
let params = List.map (fun c -> subst_univs_level_constr subst c) params in
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this bug have been prevented by a better API? For example, couldn't the types distinguish whether we applied the substitution or not?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard to tell. But it's clear that the current API is not satisfactory. In particular, subst_univs_level_constr is somewhat misleading, we should use subst_instance_constr instead, but it's not yet defined in EConstr.

8000
@ejgallego ejgallego added the needs: benchmarking Performance testing is required. label Dec 15, 2017
@ppedrot
Copy link
Member Author
ppedrot commented Dec 16, 2017

I've launched a bench here, but I highly doubt it'll have any observable consequence. The main reason being that in absence of polymorphic canonical structures, this shouldn't perform any additional substitution, and precisely because of the present bug the latter are not usable.

@ppedrot
Copy link
Member Author
ppedrot commented Dec 17, 2017

No observable change in time nor memory.

@ppedrot ppedrot removed the needs: benchmarking Performance testing is required. label Dec 17, 2017
@maximedenes
Copy link
Member

Build was canceled, restarting.

@maximedenes maximedenes merged commit cab5e98 into rocq-prover:master Dec 18, 2017
Zimmi48 added a commit to Zimmi48/coq that referenced this pull request Dec 18, 2017
@ppedrot ppedrot deleted the fix-5368 branch December 19, 2017 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: fix This fixes a bug or incorrect documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0