aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'github/pr/257' into v8.6Gravatar Maxime Dénès2016-09-30
|\ | | | | | | Was PR#257: [checker] Fix/fine tune printing.
* \ Merge branch 'v8.5' into v8.6Gravatar Maxime Dénès2016-09-30
|\ \
| * \ Merge branch '4762' into v8.5Gravatar Maxime Dénès2016-09-30
| |\ \ | | | | | | | | | | | | Was PR#293: Fix #4762 (eauto weaker than auto).
| | * | Fix #4762.Gravatar Cyprien Mangin2016-09-30
| | | |
* | | | Fix bug #4798: compat notations should not modify the parser.Gravatar Pierre-Marie Pédrot2016-09-29
| | | | | | | | | | | | | | | | | | | | | | | | This is a quick fix. The Metasyntax module should be thoroughly revised in trunk, because it starts featuring a lot of spaghetti code and redundant data.
* | | | STM: compute the correct state for edited Qed (#5086)Gravatar Enrico Tassi2016-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a proof is 're-opened', the Qed node does not change. Still the STM has to install the old state (where only the future proof has to be updated). This bit was missing. Why was it working: the bug happens only if you reopen the very last proof, i.e. there is no sentence that stays valid after the Qed. If there is such a sentence, its state was computed correctly before, and is not changed. If it is the very last, then the next state is based on the wrong one...
* | | | Arguments: cleanup + detect discrepancy rename/implicit (#3753)Gravatar Enrico Tassi2016-09-29
| | | | | | | | | | | | | | | | | | | | It seems warnings are not taken into account in output/ tests.
* | | | Merge branch 'bug5036' into v8.6Gravatar Matthieu Sozeau2016-09-29
|\ \ \ \
| * | | | Fix bug #5036 autorewrite, sections and universesGravatar Matthieu Sozeau2016-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Universe context not properly declared. Improve API and code in declare.ml to allow declaration of universe contexts, used by declaration of universes and constraints (separately).
* | | | | Merge branch 'bug4723' into v8.6Gravatar Matthieu Sozeau2016-09-29
|\ \ \ \ \
* | | | | | Being more informative about the change of behavior of "subst".Gravatar Hugo Herbelin2016-09-29
| | | | | |
* | | | | | fix bug 3683 : adds references to the web site for the bug trackerGravatar Yves Bertot2016-09-29
| | | | | | | | | | | | | | | | | | | | | | | | in error messages
* | | | | | Fix bug #5011: Anomaly on [Existing Class].Gravatar Pierre-Marie Pédrot2016-09-29
| | | | | |
| | | * | | Fix a bug in subst releaved by an OCaml warning.Gravatar Maxime Dénès2016-09-29
| | | |/ /
* | | | | test-suite: fix sed on OS X, does not handle +Gravatar Matthieu Sozeau2016-09-29
| | | | |
| * | | | Cleanup API, making inference_hook optionalGravatar Matthieu Sozeau2016-09-29
| | | | |
* | | | | Ncring_initial: avoid a notation overridingGravatar Pierre Letouzey2016-09-29
| | | | |
* | | | | Extraction: ignore some useless stuff about universesGravatar Pierre Letouzey2016-09-29
| | | | |
* | | | | Argument : assert does fail if no arg is given (fix #4864)Gravatar Enrico Tassi2016-09-29
| | | | |
* | | | | -profile-ltac-cutoff alike Show Ltac Profile Cutoff (#5100)Gravatar Enrico Tassi2016-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | With this command line flag one can profile ltac in files /and/ trim the results without actually touching the files.
* | | | | Ring_theory: avoid overriding a few notationsGravatar Pierre Letouzey2016-09-28
| | | | |
* | | | | ZDivEucl: notations in different scope to avoid a warningGravatar Pierre Letouzey2016-09-28
| | | | |
* | | | | Adding interface files to Nsatz ML files.Gravatar Pierre-Marie Pédrot2016-09-28
| | | | |
| * | | | Fix bug #4723 and FIXME in API for solve_by_tacGravatar Matthieu Sozeau2016-09-28
| |/ / / | | | | | | | | | | | | | | | | | | | | This avoids leakage of universes. Also makes Program Lemma/Fact work again, it tries to solve the remaining evars using the obligation tactic.
* | | | Do not stop propagation of signals when Coq is busy (bug #3941).Gravatar Guillaume Melquiond2016-09-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When inserting a character in an already processed buffer, a message is sent to Coq so that the proof is backtracked and the character is inserted. If a second character is inserted while Coq is still busy with the first message, the action is canceled, but the signal is no longer dropped so that the second character is properly inserted.
* | | | Warning about similar notations now up to alpha-conversion.Gravatar Hugo Herbelin2016-09-28
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows to define on purpose the very same notation in different files, as currently the notations for *, +, - in Nat.v and Peano.v (with the first one using variables n and m and the second one using the default variables used by Infix, namely x and y). This makes also the "notation-overridden" warning less enigmatic facing two notations which are the same up to the choice of names.
* | | Typeclass backtracking example by J. LeivantGravatar Matthieu Sozeau2016-09-28
| | |
* | | Remove incorrect assertion in cbn (bug #4822).Gravatar Guillaume Melquiond2016-09-28
| | | | | | | | | | | | | | | | | | This assertion checked that two arguments in the same position were equal, but in fact, since one might have already been reduced, they are only convertible (which is too costly to check in an assertion).
* | | Merge remote-tracking branch 'github/pr/232' into v8.6Gravatar Maxime Dénès2016-09-28
|\ \ \ | | | | | | | | | | | | Was PR#232: Fix the parsing of goal selectors.
* | | | Fix bug #4553: CoqIDE gives warnings about deprecated GTK features.Gravatar Pierre-Marie Pédrot2016-09-27
| | | |
* | | | Fix #5061: Warnings flag has no discernible valueGravatar Maxime Dénès2016-09-27
| | | | | | | | | | | | | | | | | | | | The default value of the warnings flag was printed as an empty string, now replaced by "default".
* | | | Add fixed test-suite file for bug #4527Gravatar Matthieu Sozeau2016-09-27
| | | |
| | * | Fixing #4887 (confusion between using and with in documentation of firstorder).Gravatar Hugo Herbelin2016-09-27
| | | |
* | | | Merge branch 'v8.5' into v8.6Gravatar Pierre-Marie Pédrot2016-09-27
|\ \ \ \ | | |/ / | |/| |
* | | | LtacProf: "Show Ltac Profile CutOff $N" (fix #5080)Gravatar Enrico Tassi2016-09-27
| | | | | | | | | | | | | | | | | | | | It seems we have no grammar rule that parses floats, so I'm parsing an integer, but the whole machinery supports floats.
* | | | Remove spaces from around list notationsGravatar Jason Gross2016-09-26
| | | |
* | | | Remove spaces from around vector notationsGravatar Jason Gross2016-09-26
| | | |
* | | | Unbreak Ltac [ | .. | ] notation in -compat 8.5Gravatar Jason Gross2016-09-26
| | | | | | | | | | | | | | | | | | | | | | | | Importing VectorNotations breaks `; []`. So we make sure it's not imported by defualt. Some files might be required to `Import VectorDef.VectorNotations` rather than just `Import VectorNotations`.
* | | | Fix bug #4785 (use [ ] for vector nil)Gravatar Jason Gross2016-09-26
| | | | | | | | | | | | | | | | | | | | Also delimit vector_scope with vector, so that people can write %vector without having to delimit it themselves.
* | | | Posssible abstractions over goal variables when inferring match return clause.Gravatar Hugo Herbelin2016-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The no-inversion and maximal abstraction over dependencies now supports abstraction over goal variables rather than only on "rel" variables. In particular, it now works consistently using "intro H; refine (match H with ... end)" or "refine (fun H => match H with ... end)". By doing so, we ensure that all three strategies are tried in all situations where a return clause has to be inferred, even in the context of a "refine". See antepenultimate commit for discussion.
* | | | Trying an abstracting dependencies heuristic for the match return clause ↵Gravatar Hugo Herbelin2016-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | even when no type constraint is given. This no-inversion and maximal abstraction over dependencies in (rel) variables heuristic was used only when a type constraint was given. By doing so, we ensure that all three strategies "inversion with dependencies as evars", "no-inversion and maximal abstraction over dependencies in (rel) variables", "no-inversion and no abstraction over dependencies" are tried in all situations where a return clause has to be inferred. See penultimate commit for discussion.
* | | | Trying a no-inversion no-dependency heuristic for match return clause.Gravatar Hugo Herbelin2016-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The no-inversion no-dependency heuristic was used only in the absence of type constraint. We may now use it also in the presence of a type constraint. See previous commit for discussion.
* | | | Inference of return clause: giving uniformly priority to "small inversion".Gravatar Hugo Herbelin2016-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As noted by Jason Gross on coq-club (Aug 18, 2016), the "small inversion" heuristic is not used consistently depending on whether the variables in the type constraint are Rel or Var. This commit simply gives uniformly preference to the inversion of the predicate along the indices of the type over other heuristics. The next three commits will improve further a uniform use of the different heuristics. ---------------------------------------------------------------------- Here are some extra comments on how to go further with the inference of the return predicate: The "small inversion" heuristic build_inversion_problem (1) is characterized by two features: - small inversion properly speaking (a), i.e. that is for a match on t:I params p1(u11..u1p1) ... pn(un1..unpn) with pi exposing the constructor structure of the indices of the type of t, a return clause of the form "fun x1..xn (y:I params x1..xn) => match x1..xn y with | p1(z11..z1p1) ... pn(zn1..znpn) => ?T@{z11..znpn} | _ => IDProp end" is used, - the dependent subterms in the external type constraint U are replaced by existential variables (b) which can be filled either by projecting (i.e. installing a dependency) or imitating (i.e. no dependency); this is obtained by solving the constraint ?T@{u11..unpn} == U by setting ?T@{z11..znpn} := U'(...?wij@{zij:=uij}...) where U has been written under the form U'(...uij...) highlighting all occurrences of each of the uij occurring in U; otherwise said the problem is reduced to the question of instantiating each wij, deciding whether wij@{zij} := zij (projection) or wij@{zij} := uij (imitation) [There may be different way to expose the uij in U, e.g. in the presence of overlapping, or of evars in U; this is left undetermined]. The two other heuristics used are: - prepare_predicate_from_arsign_tycon (2): takes the external type constraint U and decides that each subterm of the form xi or y for a match on "y:I params x1 ... xn" is dependent; otherwise said, it corresponds to the degenerated form of (1) where - no constructor structure is exposed (i.e. each pi is trivial) - only uij that are Rel are replaced by an evar ?wij and this evar is directly instantiated by projection (hence creating a dependency), - simple use of of an evar in case no type constraint is given (3): this evar is not dependent on the indices nor on the term to match. Heuristic (1) is not strictly more powerful than other heuristics because of (at least) two weaknesses. - The first weakness is due to feature (b), i.e. to letting unification decide whether these evars have to create a dependency (projection) or not (imitation). In particular, the heuristic (2) gives priority to systematic abstraction over the dependencies (i.e. giving priority to projection over imitation) and it can then be better as the following example (from RelationClasses.v) shows: Fixpoint arrows (l : Tlist) (r : Type) : Type := match l with | Tnil => r | A :: l' => A -> arrows l' r end. Fixpoint predicate_all (l : Tlist) : arrows l Prop -> Prop := match l with | Tnil => fun f => f | A :: tl => fun f => forall x : A, predicate_all tl (f x) end. Using (1) fails. It proposes the predicate "fun l' => arrows ?l[l':=l'] Prop" so that typing the first branch leads to unify "arrows ?l[l:=Tnil] Prop == Prop", a problem about which evarconv unification is not able (yet!) to see what are the two possible solutions. Using (2) works. It instead directly suggests that the predicate is "fun l => arrows l Prop" is used, so that unification is not needed. Even if in practice the (2) is good (and hence could be added to (1)), it is not universally better. Consider e.g. y:bool,H1:P y,H2:P y,f:forall y, P y -> Q y |- match y as z return Q y with | true => f y H1 | false => f y H2 end : Q y There is no way to type it with clause "as z return Q z" even if trying to generalize H1 and H2 so that they get type P z. - A second weakness is due to the interaction between small inversion and constructors having a type whose indices havex a less refined constructor structure than in the term to match, as in: Inductive I : nat -> Set := | C1 : forall n : nat, listn n -> I n | C2 : forall n : nat, I n -> I n. Check (fun x : I 0 => match x with | C1 n l => 0 | C2 n c => 0 end). where the inverted predicate is "in I n return match n with 0 => ?T | _ => IDProp end" but neither C1 nor C2 have fine enough types so that n becomes constructed. There is a generic solution to that kind of situation which is to compile the above into Check (fun x : I 0 => match x with | C1 n l => match n with 0 => 0 | _ -> id end | C2 n c => match n with 0 => 0 | _ -> id end end). but this is not implemented yet. In the absence of this refinement, heuristic (3) can here work better. So, the current status of the claim is that for (1) to be strictly more powerful than other current heuristics, work has to be done - (A) at the unification level (by either being able to reduce problems of the form "match ?x[constructor] with ... end = a-rigid-term", or, at worst, by being able to use the heuristic favoring projecting for such a problem), so that it is better than (2), - (B) at the match compilation level, by enforcing that, in each branch, the corresponding constructor is refined so has to match (or discriminate) the constraints given by the type of the term to match, and hence being better than (3). Moreover, (2) and (3) are disjoint. Here is an example which (3) can solve but not (2) (and (1) cannot because of (B)). [To be fixed in next commit.] Inductive I : bool -> bool -> Type := C : I true true | D x : I x x. Check fun z P Q (y:I true z) (H1 H2:P y) (f:forall y, P y -> Q y z) => match y with | C => f y H1 | D _ => f y H2 end : Q y z. Indeed, (2) infers "as y' in I b z return Q y z" which does not work. Here is an example which (2) can solve but not (3) (and (1) cannot because of (B) again). [To be fixed in 2nd next commit]. Check fun z P Q (y:I true z) (H1 H2:P y) (f:forall y z, P y -> Q y z) => match y with | C => f y true H1 | D b => f y b H2 end : Q y z.
* | | | Fast russian peasant exponentiation in Nsatz.Gravatar Pierre-Marie Pédrot2016-09-26
| | | |
* | | | Monomorphizing various uses of arrays in Nsatz.Gravatar Pierre-Marie Pédrot2016-09-26
| | | |
* | | | Partial fix for bug #5085: nsatz_compute stack overflows.Gravatar Pierre-Marie Pédrot2016-09-26
| | | | | | | | | | | | | | | | | | | | This fixes the stack overflow part of the bug, even if the tactic is still quite slow. The offending functions have been written in a tail-recursive way.
* | | | Fix bug #5093: typeclasses eauto depth arg does not accept a var.Gravatar Pierre-Marie Pédrot2016-09-26
| | | |
* | | | Fix bug #5090: Effect of -Q depends on coqtop's current directory.Gravatar Pierre-Marie Pédrot2016-09-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug was seemingly introduced on purpose by commit 9c5ea63 in 2001. It seems that the original motivation was to deactivate a warning when overriding the default loadpath binding of the current directory, but in the end it made it non-overridable.
* | | | The coqtop options -Q and -R do not affect the ML loadpath anymore.Gravatar Pierre-Marie Pédrot2016-09-25
| | | | | | | | | | | | | | | | | | | | | | | | It seems that such options were adding the considered path to the ML loadpath as well, which is not what is documented, and does not provide an atomic way to manipulate Coq loadpaths.
* | | | Moving "move" in the new proof engine.Gravatar Hugo Herbelin2016-09-24
| | | |