aboutsummaryrefslogtreecommitdiff
path: root/pretyping
AgeCommit message (Collapse)Author
2015-03-04Merge branch 'v8.5'Pierre-Marie Pédrot
2015-03-04Fix bug #3532, providing universe inconsistency information when aMatthieu Sozeau
unification fails due to that, during a conversion step.
2015-03-03Fix bug #3590, keeping evars that are not turned into named metas byMatthieu Sozeau
pattern_of_constr in an evar_map, as they can appear in the context of said named metas, which is used by change. Not sure what to do in the PEvar case, which never matches anyway according to Constr_matching.matches.
2015-03-03Fix bug #4103: forgot to allow unfolding projections of cofixpoints likeMatthieu Sozeau
cases, in some cases.
2015-03-03Fix bug #4101, noccur_evar's expand_projection can legitimately failMatthieu Sozeau
when called from w_unify, so we protect it.
2015-03-03Fix bug introduced by my last commit, forgetting to adjust de BruijnMatthieu Sozeau
index lookup.
2015-03-02Fix bug #4097.Matthieu Sozeau
2015-02-28Merge branch 'v8.5'Pierre-Marie Pédrot
2015-02-27Taking current env and not global env in b286c9f4f42f (4 commits ago,Hugo Herbelin
as revealed by #2141).
2015-02-27simpl: honor Global for "simpl: never" (Close: 3206)Enrico Tassi
It was an integer overflow! All sorts of memories.
2015-02-27Add support so that the type of a match in an inductive type with let-inHugo Herbelin
is reduced as if without let-in, when applied to arguments. This allows e.g. to have a head-betazeta-reduced goal in the following example. Inductive Foo : let X := Set in X := I : Foo. Definition foo (x : Foo) : x = x. destruct x. (* or case x, etc. *)
2015-02-27Fixing first part of bug #3210 (inference of pattern-matching returnHugo Herbelin
clause in the presence of let-ins in the arity of inductive type).
2015-02-27Fixing typo resulting in wrong printing of return clauses forHugo Herbelin
inductive types with let-in in arity.
2015-02-27Adding a new folder corresponding to the low-level part of the pretyperPierre-Marie Pédrot
together with the tactic monad. The move is not complete yet, because some file candidates for this directory have almost useless dependencies in other ones that should not be moved.
2015-02-25STM: proof state also includes meta countersEnrico Tassi
Workers send back incomplete system states (only the proof part). Such part must include the meta/evar counter.
2015-02-25Still continuing cf6a68b45, d64b5766a and 2734891ab7e on integratingHugo Herbelin
ensure_evar_independent into is_constrainable_in (a simpler approach closest to what existed before cf6a68b45).
2015-02-25Optimizing noccur_evar wrt expansion of let-ins (fix for variant of #4076).Hugo Herbelin
2015-02-25An optimization on filtering evar instances with let-ins suggested byHugo Herbelin
inefficiency #4076. In an evar context like this one x:X, y:=f(x), z:Z(x,y) |- ?x : T(x,y,z) with unification problem a:A, b:=f(t(a)) |- ?x[x:=t(a);y:=b;z:=u(a,b)] = v(a,b,c) we now keep y after filtering, iff the name b occurs effectively in v(a,b,c), while before, we kept it as soon as its expansion f(t(a)) had free variables in v(a,b,c), which was more often, but useless since the point in keeping a let-in in the instance is precisely to reuse the name of the let-in while unifying with a right-hand side which mentions this name.
2015-02-24[Proofview.tclPROGRESS]: do not consider that trivial goal instantiation is ↵Arnaud Spiwack
progress. Also compare goals up to evar instantiation (otherwise no progress would be observed when only unification occurs, unless some [nf_evar] is done). Performance look unchanged so far. Some code from [Evd] which was used only in [tclPROGRESS] have been moved out (and [progress_evar_map] was now dead, so I killed it). Fixes bugs (one reported directly on coqdev, and #3412).
2015-02-24Another bug (de Bruijn) in continuing cf6a68b45 and d64b5766a onHugo Herbelin
integrating ensure_evar_independent into is_constrainable_in.
2015-02-23Compensating 6fd763431 on postponing subtyping evar-evar problems.Hugo Herbelin
Pushing pending problems had the side-effect of later solving them in the opposite order as they arrived, resulting on different complexity (see e.g. #4076). We now take care of pushing them in reverse order so that they are treated in the same order.
2015-02-23Fixing cf6a68b45 on integrating ensure_evar_independent into ↵Hugo Herbelin
is_constrainable_in.
2015-02-23Fix some typos in comments.Guillaume Melquiond
2015-02-23Fixing rewrite/subst when the subterm to rewrite is argument of an Evar.Hugo Herbelin
This was broken by the attempt to use the same algorithm for rewriting closed subterms than for rewriting subterms with evars: the algorithm to find subterms (w_unify_to_subterm) did not go through evars. But what to do when looking say, for a pattern "S ?n" in a goal "S ?x[a:=S ?y]"? Should we unify ?x[a:=S ?y] with ?n or consider ?x as rigid and look in the instance? If we adopt the first approach, then, what to do when looking for "S ?n" in a goal "?x[a:=S ?y]"? Failing? Looking in the instance? Is it normal that an evar behaves as a rigid constant when it cannot be unified with the pattern?
2015-02-23Fixing occur-check which was too strong in unification.ml.Hugo Herbelin
2015-02-21Fixing bug #3071.Pierre-Marie Pédrot
2015-02-21Continuing experimentation on what part of the instance of an evarHugo Herbelin
to display by default (see bc8a5357889 - 17 Oct 2014): - not printing instances for let-in anymore even when expanded (since they are canonical up to conversion) - still printing x:=x in [x:=x;x':=x] when x is directly an instance of another var, but not in [x:=x;x':=S x] This can be discussed, but if ever this is to be changed, it should not be printed in [x:=x;x:=?n] with ?n implicitly depending on x (otherwise said, variables which are not displayed in instances of internal evars should not contribute to the decision of writing x:=x in the instance).
2015-02-21Removing need for ensure_evar_independent by passing a force flag to ↵Hugo Herbelin
is_constrainable_in to do the job of ensuring that ?p does not belong to the ti while solving ?p[...]:=?n[t1..tn].
2015-02-19When looking for restrictions in ?n=?p problems, keep the type of let-bindings.Hugo Herbelin
Bindings of the form [let x:T := M] are unfolded into [(M:T)], so that occur-check is done in [T] as well as in [M] (except when [M] is a variable, where it is hopefully not necessary). This is a way to fix #4062 (evars with type depending on themselves). The fix modifies the alias map (make_alias_map) but it should behave the same at all places using alias maps other than has_constrainable_free_vars.
2015-02-16Remove some dead code and add test-suite file.Matthieu Sozeau
2015-02-16Fix bug #3960: potential evar instance categorized as an unresolvableMatthieu Sozeau
goal in Instance. Also remove some dead code.
2015-02-15Fix 'don't expose cases' in cbnPierre Boutillier
2015-02-15Fixing bug #3490.Pierre-Marie Pédrot
2015-02-15Fixing bug #3916.Pierre-Marie Pédrot
2015-02-14Univs: fix bug #3755. We were missing refreshements of universes inMatthieu Sozeau
unifications ?X ~= ?Y foo not catched by solve_evar_evar.
2015-02-12Fixing #3997 (occur-check in the presence of primitive projections, patchHugo Herbelin
from Matthieu).
2015-02-11Fixing bug #3900.Pierre-Marie Pédrot
2015-02-10Fixing #4001 (missing type constraints when building return clause of match).Hugo Herbelin
2015-02-02Removing dead code.Pierre-Marie Pédrot
2015-01-19Making unification of LetIn's expressions more consistent (see #3920).Hugo Herbelin
Unifying two let-in's expresions syntactically is a heuristic (compared to performing the zeta-reduction). This heuristic was requiring unification of types which is too strong for the heuristic to work uniformly since the types might only be related modulo subtyping. The patch is to remove the unification of types, which allows then to have the heuristic work uniformly on the bodies. On the other side, I hope it does not loose (still heuristical) unifications compared to before (presumably, since instantiating the evars in the body will induce constraints for solving potential evars in the types of the let-in bodies, but this would need a proof). Anyway, it is not about correction, it is about a heuristic, which maybe done too early actually.
2015-01-17Univs: proper printing of global and local universe names (onlyMatthieu Sozeau
printing functions touched in the kernel).
2015-01-17Univs: Fix alias computation for VMs, computation of normal form ofMatthieu Sozeau
match predicates for vm_compute and compile polymorphic definitions to constant code. Add univscompute test-suite file testing VM computations in presence of polymorphic universes.
2015-01-17Make native compiler handle universe polymorphic definitions.Maxime Dénès
One remaining issue: aliased constants raise an anomaly when some unsubstituted universe variables remain. VM may suffer from the same problem.
2015-01-15Correct restriction of vm_compute when handling universe polymorphicMatthieu Sozeau
definitions. Instead of failing with an anomaly when trying to do conversion or computation with the vm's, consider polymorphic constants as being opaque and keep instances around. This way the code is still correct but (obviously) incomplete for polymorphic definitions and we avoid introducing an anomaly. The patch does nothing clever, it only keeps around instances with constants/inductives and compile constant bodies only for non-polymorphic definitions.
2015-01-13Fix issue in printing due to de Bruijn bug when constructing compatibilityMatthieu Sozeau
constr for primitive records (not used anywhere else than printing). Problem reported by P. LeFanu Lumsdaine on HoTT/HoTT. Also add some minor fixes in detyping and pretty printing related to universes.
2015-01-12Update headers.Maxime Dénès
2015-01-12Not "Setting ?n=?p order to ?p:=?n to see if it solves someHugo Herbelin
incompatibilities wrt 8.4.", as it creates other problems (in Ergo and Compcert). This reverts commit bf388dfec041ab0fa74ae5d484600f6fcf515e4f.
2015-01-08Setting ?n=?p order to ?p:=?n to see if it solves some incompatibilities wrt ↵Hugo Herbelin
8.4.
2015-01-08Avoiding introducing yet another convention in naming files.Hugo Herbelin
2015-01-07Reverting the tentative try to restore the use of second-orderHugo Herbelin
typed-based matching: it provokes a stack overflow in contrib ClassicalRealisability. To be investigated later on. (See 893a02f643858ba0b0172648e77af9ccb65f03df.)