Skip to content

Export locality for all hint commands#13388

Merged
coqbot-app[bot] merged 3 commits intorocq-prover:masterfrom
ppedrot:export-locality-for-all-hint-commands
Nov 16, 2020
Merged

Export locality for all hint commands#13388
coqbot-app[bot] merged 3 commits intorocq-prover:masterfrom
ppedrot:export-locality-for-all-hint-commands

Conversation

@ppedrot
Copy link
Copy Markdown
Member

@ppedrot ppedrot commented Nov 15, 2020

This is completing the implementation of export locality for the Cut, Mode, Transparent / Opaque and Remove Hints commands. This is necessary for a satisfying implementation of #13384 where we don't have to do half the job for some commands and delay the groundwork for a future fix to a later release.

As such, dear assignee and RMs, this is high priority for 8.13. Sorry for being pushy at the last moment, although this is quite usual in the dev process...

@ppedrot ppedrot added the kind: enhancement Enhancement to an existing user-facing feature, tactic, etc. label Nov 15, 2020
@ppedrot ppedrot requested review from a team as code owners November 15, 2020 14:34
@ppedrot ppedrot force-pushed the export-locality-for-all-hint-commands branch from 9bef5b7 to f04c963 Compare November 15, 2020 14:35
Copy link
Copy Markdown
Member

@Zimmi48 Zimmi48 left a comment

Choose a reason for hiding this comment

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

LGTM (I've reviewed the PR in full and can be the assignee if needed).
I'm just wondering if the locality attributes should not also be supported by the Create HintDb command. Currently, it is superglobal and it's not innocuous since Create HintDb changes the default transparency compared to an implicitly created hint database. Furthermore, it is my impression that supporting the locality attributes for this command as well would lead to a lot of code factorization. Up to you...

@ppedrot
Copy link
Copy Markdown
Member Author

ppedrot commented Nov 15, 2020

Create HintDb is purposely left with a superglobal semantics. Since hint databases do not have qualified names but mere strings, it doesn't make sense to ask them to follow an Import-scoped semantics. One day maybe we'll learn not to give mere strings as user-facing objects identifiers...

@ppedrot
Copy link
Copy Markdown
Member Author

ppedrot commented Nov 15, 2020

(The proper fix for this command is to give kernel names to hint databases, but it's a change that's way bigger than the current PR, and that will entail amongst other backwards incompatibility.)

@Zimmi48
Copy link
Copy Markdown
Member

Zimmi48 commented Nov 15, 2020

Sounds good to me.

@ppedrot ppedrot force-pushed the export-locality-for-all-hint-commands branch from f04c963 to 7e55f48 Compare November 15, 2020 15:06
@Zimmi48 Zimmi48 self-assigned this Nov 15, 2020
@Zimmi48 Zimmi48 added this to the 8.13+beta1 milestone Nov 15, 2020
@Zimmi48
Copy link
Copy Markdown
Member

Zimmi48 commented Nov 15, 2020

Given the upcoming freeze, let's be proactive. I'm self-assigning and announcing that I will merge this PR on Monday 16th (tomorrow) noon if there are no more comments in the meantime.

@gares
Copy link
Copy Markdown
Member

gares commented Nov 16, 2020

please go

@gares gares added the priority: blocker The next release should be delayed if this is not fixed. label Nov 16, 2020
@Zimmi48
Copy link
Copy Markdown
Member

Zimmi48 commented Nov 16, 2020

@coqbot: merge now

@coqbot-app coqbot-app bot merged commit 57fb6f1 into rocq-prover:master Nov 16, 2020
@ppedrot ppedrot deleted the export-locality-for-all-hint-commands branch November 16, 2020 11:28
@mattam82
Copy link
Copy Markdown
Member

I just noticed, what about Hint Rewrite ?

@ppedrot
Copy link
Copy Markdown
Member Author

ppedrot commented Nov 16, 2020

Hint Rewrite uses a different database mechanism, so the plan does not apply.

@Zimmi48
Copy link
Copy Markdown
Member

Zimmi48 commented Nov 16, 2020

BTW, this is super confusing that Hint Rewrite looks like a command of the Hint family despite using a different system.

@mattam82
Copy link
Copy Markdown
Member

It is a command of the hint family: to the user that is not confusing at all. The implementation is confusing though, and we should certainly merge the bases here, accepting rewrite lemmas and resolution lemmas in the same database. There could certainly be some uses of developping proof-search up-to rewriting automation based on them. The rewrite hint databases need the same set-theoretic operations than the "lemma" hint databases too.

@mattam82
Copy link
Copy Markdown
Member

@ppedrot what I meant is, do they also have superglobal status by default?

@ppedrot
Copy link
Copy Markdown
Member Author

ppedrot commented Nov 16, 2020

do they also have superglobal status by default?

Yes, they do look superglobal by default indeed.

The implementation is confusing though

Not only the implementation. Even the documentation of that command is part of another subsection of the automation chapter.

@Zimmi48
Copy link
Copy Markdown
Member

Zimmi48 commented Nov 17, 2020

to the user that is not confusing at all

I call this confusing:

Hint Rewrite plus_O_n : foo.

Fail Print HintDb foo.
(*
The command has indeed failed with message:
No such Hint database: foo.
*)

we should certainly merge the bases here

Great! Can we get a roadmap for the hint database system? It will certainly influence the documentation as well (the current status is terrible, so I really want to change it but it would be stupid to change it in a way that is not consistent with this roadmap).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind: enhancement Enhancement to an existing user-facing feature, tactic, etc. priority: blocker The next release should be delayed if this is not fixed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants