Fix rewrite in * side conditions#915
Conversation
I was hoping to trigger a discussion on how to deal with tactic compatibility in general but no discussion happens. Considering that the fix has no impact on Travis and a small one on coq-contribs, I guess that we can commit it independently of a general discussion about tactic compatibility. |
|
I also tried to relaunch this discussion at the WG of October without success. |
|
@herbelin Could we document the new behavior (if it is not already)? And add a |
|
@maximedenes: it is more a bug fix than a new behavior, in that it is the natural expectation, and what |
|
It might not be worth documenting now if not stabilized but the note in |
|
But then, shouldn't we do that virtually for all bug fixes, which we could certainly try to do with a bit of discipline (and which @maximedenes did for some former version), but which we did not do yet for 8.8 and which we would have to do retroactively? (I'm however ok to do for my own fixes if decided.) The alternative is to have this kind of link as for 8.7.1 but it shall not a priori be as long-lasting and trackable as in a file. |
|
Come on Hugo, it is you who started your PR by saying that there was a risk of incompatibility and proposed as a first possible solution:
I precisely don't want to put all bug fixes in CHANGES because it would mean that compatibility breaking bug fixes (especially when they are a direct change to tactics) are not highlighted in any way. |
I disagree. "Natural expectation" is way too subjective to consider this a pure bug fix. And even so, what does it cost to add a Listing bug fixes systematically in
I would prefer that we document at least this particular behavior now. The fact that some other behaviors are not uniform or maybe counter-intuitive is an argument for more documentation IMHO, not less. |
I'm unsure to understand what you are disagreeing with. Do you personally think that not rewriting in the side conditions is not the intended behavior? If yes, could you give examples highlighting what is your "natural" expectation?
As @Zimmi48 noticed, this was apparently my initial proposal. As far as I understand the question, it costs nothing to add an entry in
If I say "The fact that some other behaviors are not uniform or maybe counter-intuitive is an argument for more documentation concomitantly with the introduction of uniformity", would it be a sentence on which we could both agree? |
|
I think that it is useful to have a two line note in the change log, saying that a bug was fixed for rewrite and say under which conditions an incompatibility might be expected. Regarding treatment of backward compatibility, the only long term general solution that I can think of is to be able to declare lemmas, proof script and tactics within "version scopes". I will try to think of a concrete proposal for ltac 2.0. |
|
@charguer I think that Coq is very close to support "versioned scripts", IMHO we are just lacking the manpower to finish the remaining bits. A particular source of problems is all the hooks that happen to be statically initialized and bring in version-dependent behavior. I'd dare to say that once that code is refactored out, a version specification pragma should be doable without too much pain. |
|
I'm a bit lost. I agree this change is "right", but I disagree with not wanting to document the behavior and the change. I was simply asking if we coud
Is there a problem with that? |
b081056 to
8b022e3
Compare
…n * |-". Noticed by Sigurd Schneider.
8b022e3 to
711b9d8
Compare
|
@maximedenes, @charguer: I added 3 lines in the @charguer: What concrete user-level API do you typically have in mind for "version scopes"? |
Hi, this fixes the problem (indirectly) reported by @sigurdschneider in the
Containerscontribution:rewritewas wrongly be called recursively also on side conditions when called with the* |-and*clauses.In theory, this is a change of semantics, but in practice, Travis does not report any incompatibility. There shall be an incompatibility on
containersthough. What shall we do, considering also the ceps discussion on configurability?CHANGES?if Flags.version_strictly_greater Flags.V8_7 then new-code else former-code, so that, at least when called with-compat 8.7, the old behavior is ensured to be the same?rewritedepend on a set of configuration flags so thatLtaccode referring torewritecan determine at definition-time whether the 8.7 semantics or 8.8 semantics is expected, even if code in 8.7 semantics is mixed with code in 8.8 semantics? I started a branch in this direction, creating a filetactic_config.mlto centralize configurabibility of tactics, knowing e.g. thatautorewritedepends onrewritewhich depends on unification, etc., so that in theory,autorewriteor even ssr'srewriteitself depends on which unification module is used and about how it is configured. Don't know what to do yet with this, but it seems to me to be a first direction to collect exactly what a given feature depends on, in a way which is not too invasive (basically only adding an explicit argumentflagsto tactics) and which can tell in one grasp attactic_config.mlwhat depends on what. This is a direction similar to the one taken in Trunk+abstracting injection flags #677, going towards being able to statically control configuration flags (though, currently, selection of flags remains done at runtime). It should be so that it does not add extra burden on developers though and that every developer can work in good conditions.ltac_plugin?