-
Notifications
You must be signed in to change notification settings - Fork 640
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
Allow hints with no specified database inside sections. #10559
Comments
Notations local to a section can be used to rebind |
That's only a very partial solution, which only works if I'm calling auto by hand, I think. It doesn't work in the more realistic case where I rely on some other tactic/notation which calls auto under the hood. Actually, I tried defining a notation for auto, but it doesn't seem to be picked up:
|
I am a bit dubious regarding the silent postponing of this issue to 8.10.1. Since it seems that we are not going to be able to provide a satisfying answer to this question by 8.10.0, what about reporting the deprecation until we can find one? @maximedenes What do you think? Was it important to you that the removal of this feature happens in 8.11? Is there anything that is going to be blocked if it doesn't? |
I would encourage indeed postponing the depreciation. |
What trouble do you mean? To have to add On the other hand, using an implicit global database seems like an obvious bad practice to me. I agree that it seems a bit less bad on local hints, although still not great since the tactic which uses these local hints will also depend on what is in So I'd like to question the fact that this use is "legitimate", as is claimed here. If everything is local, why not use a local database (maybe copying an existing global one, but explicitly) ? If the real problem is that the syntax is inconvenient / too verbose, let's work on improving that, rather than relying on shaky semantics. |
FTR I tried to work on this, but we need to define what the union of bases is. For example, if two incompatible transparency flags are defined for the same constant, what should the result be? |
What I can do to improve the current situation is to provide a Should it have effect on hint commands only? Or on automation tactics too? Should it be allowed anywhere, or only in a section? |
Remark: the union of bases is already implicitly defined by the interpretation of "eauto with foo bar", which effectively considers the union of bases foo and bar (and core). I don't know if this specification of union is the desirable one, but it already exists, it seems to me. |
Now if you'd like to go for something simpler than syntax/semantics for union of bases, here is my proposal.
As a result, the current pattern that I explain above to be useful can be obtained simply by adding "Local" modifiers to the hints that I define. In any case, any addition of a new mechanism deserves discussion and feedback, and it would be counterproductive to settle on some design for new features (whether |
To handle this, I would suggest "core" not be imported by default (eventually, this base should get deprecated). The command |
That's the
I agree, this was another motivation of the deprecation: all bases should be defined on the user side, not baked in the system. Also, they should be designated by qualids, not short global names.
Seems interesting, but what does imported mean here? That the "core" database would not be visible, or that it would not be picked up by automation tactics? |
The "core" database would exist, but would be deprecated and eventually eliminated. In other words, in the script
the last tactic is to be interpreted as
Meaning that hint data bases are stacked, in the sense that more recent hints are considered before older hints, when their priority level is the same. |
Please let's not talk about union of bases here. It already has its own issue and it is definitely not an 8.10 question. And for having thought about this with Armael, it is indeed far from trivial. |
Agreed. Hence the suggestion to define everything in terms of "eauto with" multiple bases. |
I'd rather not implement a half-baked feature without carefully considering the long-term consequences of this design. The fact that it is difficult to define the union of databases does not mean that we should not do it. Regarding my proposal to delay the deprecation to 8.11, this was just intended to leave the time to implement and properly test one of the idea that were proposed in this thread, like the Local Hint command. |
There is something I don't understand, though. The proposals are talking about changing the semantics of the |
So, if we implement something like the |
My suggestion would be to implement |
What I don't understand is what you do for people who already use |
In the future yes, but not at once, no. (At least I would also recommend against this.)
The new feature could also be guarded behind an option, so that users can activate it manually and avoid adding all the
I disagree on the need on publishing a half-baked feature in 8.10. We are pretty capable of testing the feature during the 8.11 cycle. |
No, the point is to change the maning of
Afaik, the current behavior of The only caveat I see is the potential reordering of the hints considered by eauto. But I don't recall reading anything about the guarantees of eauto w.r.t. the order in which it considers the hints. How many proof script would be affected by that, when it comes to "local hints"? Regarding the translation, it seems to me reasonably feasible to replace |
Should this be considered a blocker for 8.11? |
In particular, it was in fact better to have a cycle with the deprecation before changing the meaning of hints with no specified database. |
OK postponing then. |
@maximedenes What is the status of this? Should it still be considered for 8.12? |
Removing the 8.12 milestone. Let's address this before removing support for no specified database, but not urgent. |
I think it's a good time to ping back on this issue. @Zimmi48 @ppedrot Let me summarize my current proposal:
|
I'm supportive of this proposal. |
This issue records that something needs to be done to properly handle the depreciation in 8.10
of hints added to the core database: #8987
Discussed with @Zimmi48 and @maximedenes
The illegitimate use pattern that the PR aims to get rid of is:
However, one very legitimate use pattern is:
I think it should continue to be accepted, in its current form, with the semantics that the hint spans over the section.
Yet to be addressed in the case of:
Should this be allowed? Should the hint span over the current proof only (intuitive) or the entire section (not intuitive, but I think it's the current behavior).
Furthermore, as a facility for users who were previously relying on the core database, and for other users in general, one very nice feature would be to enable extending the "current" hint database with an existing database.
Such a script could be a properly fixed version of the illegitimate pattern described at first in this thread.
Last, as a killer feature, one would be able to assign a name to the union of several bases. This would enable modularity in proof scripts. Such a desirable property.
Ability to remove one or several hints would also be the next feature wish (that would require hint externs to be assigned explicit names, to allow referring to them).
Please note that:
Remark: if the syntax
Hint Resolve foo.
not inside a section is removed, it could then be reinterpreted asLocal Hint Resolve foo
, which has the meaning "use foo as a hint within the scope of the current file".Summary of current proposal (see #10559 (comment))
core
).eauto
tactic loads by default the hints from the databases associated with current section and current module (just like aneauto with
would do).implicit-core-hint-db
warning. #14752Create HindDb mybase := (union base1 base2 base3).
can be used to create union of databases. If the implementation is tricky, we could start with the following interpretation:eauto with mybase
is shorthand foreauto with base1 base2
. This has a simple, well-defined semantics, probably quite close from the one that we want. We can warn users that this is an experimental feature, in particular the priority of how hints apply may be updated in a future release.The text was updated successfully, but these errors were encountered: