Conversation
|
These commits we haven't reviewed together yet:
|
|
Hi, all these extra commits we did not already reviewed look good to me, up to the following exceptions.
I also slightly hesitated about 0c10882, but after all, I agree that this information is more difficult to understand than useful. |
|
As you suggested on Friday evening, commit b0b0da6 changes the way how examples:
These examples are now presented as (framed) figures which interested reader may inspect and uninterested reader can easily skip. The figures are kept close to the position where their contents is relevant. |
An Ltac trace printing mechanism was introduced in 8.4 which was inadvertedly modified by a series of commits such as 8e10368, 91f44f1, ... It was also sometimes buggy, iirc, when entering ML tactics which themselves were calling ltac code. It got really bad in 8.5 as in: Tactic Notation "f" constr(x) := apply x. Ltac g x := f x. Goal False. idtac; f I. (* bad location reporting *) g I. (* was referring to tactic name "Top.Top#<>#1" *) which this commit fixes. I don't have a clear idea of what would be the best ltac tracing mechanism, but to avoid it to be broken without being noticed, I started to add some tests. Eventually, it might be worth that an Ltac expert brainstrom on it!
Tactic Notation "f" constr(x) := apply x. Ltac g x := f x. Goal False. g I. (* Was printing Top.Top#<>#1 *) idtac; f I. (* Was not properly locating error *) This is a "a minima" fix. This a different fix than in trunk, so the merge will have to take the trunk version.
add some more material (preliminary provided in "tuto2" directory)
The conclusion of WF-MOD2 was WF(E; Mod(X:S1[:=S2]))[]. But S2 should not be optional. In the case that S2 is not given here, WF-MOD2 is same as WF-MOD1 with meaningless premises for S2. rocq-prover@81f1219 changes the macro \Mod as: -\newcommand{\Mod}[3]{{\sf Mod}({#1}:{#2}:={#3})} +\newcommand{\Mod}[3]{{\sf Mod}({#1}:{#2}\,\zeroone{:={#3}})} So, "[" and "]" added in WF-MOD2 seems accidental.
\Indp and \Indpstr contains "(#1)" but all uses of \Indp and \Indpstr has empty first argument: \Indp{}... and \Indpstr{}... When the macros are introduced, \Ind also had "(#1)". rocq-prover@384d390 rocq-prover@81f1219 Later, \Ind removes "(#1)". rocq-prover@b94bdd3 "(#1)" was used to represent the local context of inductive definitions. So, we can remove "(#1)" from \Indp and \Indpstr.
For efficiency, Rtree.inter tries to preserve as much of the common
structure of the two trees to intersect, so expansions are done
lazily.
Rtree.inter uses an history and I understand that this history is used
to ensure that only a finite number of expansions is needed to manage
overlapping expansions.
My understanding is that the effective expansion of variables is
missing when using this history: this is a reason for an
incompletenesses of Rtree.inter, which sometimes falls and fails in an
unsupported Rec/Var case.
The commit is fixing this, by instantiating the variables before using
the history.
A typical example of incompleteness before the fix is when comparing
the following equivalent trees:
Rec{Mrec[Wrapper, 0],
[(Rec{Nested[Unwrapper, 0], [(), (#1:0)]})]}
and
Rec{Nested[Wrapper, 0],
[(Rec{Mrec[Unwrapper, 0], [(), (Rec{Nested[Wrapper, 0], [(#1:0)]})]})]}
(example from success/fix.v)
For efficiency, Rtree.inter tries to preserve as much of the common
structure of the two trees to intersect, so expansions are done
lazily.
Rtree.inter uses an history and I understand that this history is used
to ensure that only a finite number of expansions is needed to manage
overlapping expansions.
My understanding is that the effective expansion of variables is
missing when using this history: this is a reason for an
incompletenesses of Rtree.inter, which sometimes falls and fails in an
unsupported Rec/Var case.
The commit is fixing this, by instantiating the variables before using
the history.
A typical example of incompleteness before the fix is when comparing
the following equivalent trees:
Rec{Mrec[Wrapper, 0],
[(Rec{Nested[Unwrapper, 0], [(), (#1:0)]})]}
and
Rec{Nested[Wrapper, 0],
[(Rec{Mrec[Unwrapper, 0], [(), (Rec{Nested[Wrapper, 0], [(#1:0)]})]})]}
(example from success/fix.v)
For efficiency, Rtree.inter tries to preserve as much of the common
structure of the two trees to intersect, so expansions are done
lazily.
Rtree.inter uses an history and I understand that this history is used
to ensure that only a finite number of expansions is needed to manage
overlapping expansions.
My understanding is that the effective expansion of variables is
missing when using this history: this is a reason for an
incompletenesses of Rtree.inter, which sometimes falls and fails in an
unsupported Rec/Var case.
The commit is fixing this, by instantiating the variables before using
the history.
A typical example of incompleteness before the fix is when comparing
the following equivalent trees:
Rec{Mrec[Wrapper, 0],
[(Rec{Nested[Unwrapper, 0], [(), (#1:0)]})]}
and
Rec{Nested[Wrapper, 0],
[(Rec{Mrec[Unwrapper, 0], [(), (Rec{Nested[Wrapper, 0], [(#1:0)]})]})]}
(example from success/fix.v)
For instance Reserved Notation "#0 #1" (at level 30). Reserved Notation "#0 #1 #2" (at level 40). (* Warning: Notations "#0 #1" defined at level 30 and "#0 #1 #2" defined at level 40 have incompatible prefixes. [prefix-incompatible-level,parsing,default] *) Reserved Notation "rocq-prover#20 rocq-prover#21 x #3 y" (x at level 30, at level 50). Reserved Notation "rocq-prover#20 rocq-prover#21 x rocq-prover#34" (x at level 40, at level 50). (* Warning: Notations "rocq-prover#20 rocq-prover#21 _ #3 _" defined at level 50 with arguments constr at level 30 and "rocq-prover#20 rocq-prover#21 _ rocq-prover#34" defined at level 50 with arguments constr at level 40 have incompatible prefixes. [prefix-incompatible-level,parsing,default] *)
I've incorporated your feedback from yesterday.