aboutsummaryrefslogtreecommitdiffhomepage
path: root/pretyping/evarconv.ml
Commit message (Collapse)AuthorAge
* Reenable FO unification of primitive projections and their eta-expandedGravatar Matthieu Sozeau2014-10-15
| | | | | | forms in evarconv and unification, as well as fallback to first-order unification when eta for constructors fail. Update test-suite file 3484 to test for the FO case in evarconv as well.
* Modify the heuristic for unfolding lhs or rhs in evarconv, consideringGravatar Matthieu Sozeau2014-10-15
| | | | | folded primitive projections in applicative stacks in rhs as named, hence prefering to unfold the lhs in these cases.
* English typo in a function name of evarconv.Gravatar Hugo Herbelin2014-10-13
|
* Revert d0cd27e209be08ee51a2d609157367f053438a10: giving a different nameGravatar Matthieu Sozeau2014-10-11
| | | | | | | for the record binder of classes. This name is no longer generated in the kernel but part of the declaration. Also cleanup the interface to recognize primitive records based on an option type instead of a dynamic check of the length of an array.
* Do not expand primitive projections eagerly in evarconv, but onlyGravatar Matthieu Sozeau2014-10-10
| | | | in cases of unification with existentials requiring it.
* Fixing the anomaly in bug #3045 (a filter was not type-safe inGravatar Hugo Herbelin2014-10-08
| | | | | | | | | | | | | | | | | | 2nd-order matching). We made the filter type-safe (i.e. to ensure that Gamma |- ?n:T is well-typed when taking the filtered context Gamma) in 2nd order matching. Maybe this weakens the power of the 2nd order matching algorithm, so it is not clear that it is the good fix. Another fix could have been to ensure that taking the closure of filter does not extend it beyond the original filter (hence keeping the filter untyped if it was already untyped). As for the bug #3045, it also revealed that some "destruct c as [[]]" could be made stronger as decomposing the destruct in two parts "destruct c as [x]; destruct x" workis while it currently fails if in one part.
* Work around issues with FO unification trying to unify terms ofGravatar Matthieu Sozeau2014-10-02
| | | | | | | | | potentially different types, resulting in ill-typed terms due to eta. Projection expansion now fails gracefully on retyping errors. The proper fix to unification, checking that the heads for FO have unifiable types, is currently too strong, adding unnecessary universe constraints, so it is disabled for now. It might be quite expensive too also it's not noticeable on the stdlib.
* Fix treatment of projections in Cst_stacks and unfolding behavior in evarconv.Gravatar Matthieu Sozeau2014-10-02
|
* Simplify evarconv thanks to new delta status of projections,Gravatar Matthieu Sozeau2014-09-30
| | | | | using whd_state_gen to handle unfolding. Add an isProj/destProj in term. Use the proper environment everywhere in unification.ml.
* In evarconv and unification, expand folded primitive projections toGravatar Matthieu Sozeau2014-09-29
| | | | | | | | | | their eta-expanded forms which can then unfold back to the unfolded primitive projection form. This removes all special code that was necessary to handle primitive projections before, while keeping compatibility. Also fix cbn which was not refolding primitive projections correctly in all cases. Update some test-suite files accordingly.
* Add a boolean to indicate the unfolding state of a primitive projection,Gravatar Matthieu Sozeau2014-09-27
| | | | | | | | so as to reproduce correctly the reduction behavior of existing projections, i.e. delta + iota. Make [projection] an abstract datatype in Names.ml, most of the patch is about using that abstraction. Fix unification.ml which tried canonical projections too early in presence of primitive projections.
* Fix canonical structure resolution which was launched on the results ofGravatar Matthieu Sozeau2014-09-26
| | | | eta-expansion, creating a loop. This is now deactivated. Fixes bugs #3665 and #3667.
* Rename eq_constr functions in Evd to not break backward compatibilityGravatar Matthieu Sozeau2014-09-24
| | | | with existing ML code.
* Move the specific map_constr_with_binders_left_to_rightGravatar Matthieu Sozeau2014-09-19
| | | | for e_contextually where it is used. Bug #3648 is fixed.
* Fix constrMatching as well as change/e_contextually to allowGravatar Matthieu Sozeau2014-09-18
| | | | matching partial applications of primitive projections. Fixes bug #3637.
* Be more conservative and keep the use of eq_constr in pretyping/ functions.Gravatar Matthieu Sozeau2014-09-17
|
* Fix bug #3593, making constr_eq and progress work up toGravatar Matthieu Sozeau2014-09-17
| | | | equality of universes, along with a few other functions in evd.
* Revert specific syntax for primitive projections, avoiding uglyGravatar Matthieu Sozeau2014-09-17
| | | | | | | | contortions in internalization/externalization. It uses a fully typed version of detyping, requiring the environment, to move from primitive projection applications to regular applications of the eta-expanded version. The kernel is unchanged, and only constrMatching needs compatibility code now.
* Providing a -type-in-type option for collapsing the universe hierarchy.Gravatar Hugo Herbelin2014-09-13
|
* Uniformisation of the order of arguments env and sigma.Gravatar Hugo Herbelin2014-09-12
|
* Fix bug #3594: eta for constructors and functions at the same time whichGravatar Matthieu Sozeau2014-09-11
| | | | | was failing in this case due to the wrong postponment of an unsolvable ?X = RigidContext[?X] problem.
* Fix bug #3589, unification looping due to incorrect use of stack with ↵Gravatar Matthieu Sozeau2014-09-08
| | | | primitive projections.
* Print [Variant] types with the keyword [Variant].Gravatar Arnaud Spiwack2014-09-04
| | | | Involves changing the [mind_finite] field in the kernel from a bool to the trivalued type [Decl_kinds.recursivity_kind]. This is why so many files are (unfortunately) affected. It would not be very surprising if some bug was introduced.
* In evarconv, do first-order unification of LetIn's properly, ensuring we ↵Gravatar Matthieu Sozeau2014-09-01
| | | | | | compare bodies of convertible types! Bug found by B. Ziliani.
* Change the way primitive projections are declared to the kernel.Gravatar Matthieu Sozeau2014-08-28
| | | | | | | | | | | Now kernel/indtypes builds the corresponding terms (has to be trusted) while translate_constant just binds a constant name to the already entered projection body, avoiding the dubious "check" of user given terms. "case" Pattern-matching on primitive records is now disallowed, and the default scheme is implemented using projections and eta (all elimination tactics now use projections as well). Elaborate "let (x, y) := p in t" using let bindings for the projections of p too.
* There are some occurs-check cases that can be handled by imitation (using ↵Gravatar Matthieu Sozeau2014-08-28
| | | | | | | pruning), hence do not entirely prevent solve_simple_eqn in case of apparent occurs-check but backtrack to eqappr on OccurCheck failures (problem found in Ssreflect).
* Make evarconv and unification able to handle eta for records in presenceGravatar Matthieu Sozeau2014-08-26
| | | | of metas/evars
* Fixing bug #3377 by giving env and sigma to constrMathching. Now it's possibleGravatar Matthieu Sozeau2014-08-25
| | | | | to match on a primitive projection application c.(p) using "?f _", binding f to (fun x => x.(p)) with the correct typing.
* Restrict eta-conversion to inductive records, fixing bug #3310.Gravatar Matthieu Sozeau2014-08-14
|
* Fix bug introduced by earlier commit on first-order unification of primitiveGravatar Matthieu Sozeau2014-08-10
| | | | | projections and their expansion, allowing unfolding when it fails. Cleanup code in reductionops.ml
* Fix unification which was failing when unifying a primitive projection againstGravatar Matthieu Sozeau2014-08-09
| | | | its expansion if it could reduce (fixes bug #3480).
* Fix evarconv not applying eta when it used to. Fixes bug#3319.Gravatar Matthieu Sozeau2014-08-08
|
* Revert patch making the oracle be used for the transparent state in evarconv,Gravatar Matthieu Sozeau2014-07-09
| | | | | which made CoRN (and probably Ergo) fail. Another option should be found for making a constant not unfoldable by tactics/refinement.
* In flex-flex cases, the undefinedness of an evar can not be preseved after ↵Gravatar Matthieu Sozeau2014-07-07
| | | | | | converting the stacks. Take care of this by recalling unification.
* Fix eta expansion of primitive records (HoTT bug #78), which now fails ↵Gravatar Matthieu Sozeau2014-07-03
| | | | | | cleanly when called on partially applied constructors. Also protect evar_conv from that case.
* Use full transparent state when checking well-typedness of a second order ↵Gravatar Matthieu Sozeau2014-06-25
| | | | | | | matching infered predicate, instead of the arguments ts which might be empty (e.g. in unification). Fixes failure in success/unification.v
* Reinstate eta for records in evarconv, fixing two HoTT coq bugs.Gravatar Matthieu Sozeau2014-06-17
|
* Removing dead code.Gravatar Pierre-Marie Pédrot2014-06-17
|
* - Add "Show Universes" to print information about universes during a proof.Gravatar Matthieu Sozeau2014-06-16
| | | | - Remove dead code in evarconv.
* Adapt simpl/cbn unfolding and refolding machinery to projections, so thatGravatar Matthieu Sozeau2014-06-13
| | | | primitive projections obey the Arguments command.
* Cleanup in Univ, moving code for UniverseConstraints outside the kernel in ↵Gravatar Matthieu Sozeau2014-06-10
| | | | | | | | Universes. Needed to exponse compare_head_gen(_leq) so that it could be reused in Universes. Remove unused functions from univ as well and refactor a little bit. Changed the syntax to Type@{} for explicit universe level specs, following the WG decision.
* Fix canonical structure resolution in unification (bug found in Ssreflect).Gravatar Matthieu Sozeau2014-06-08
|
* Fix canonical structure resolution (makes test-suite files go through again).Gravatar Matthieu Sozeau2014-06-04
|
* More fixes of unification with primitive projections (missed cases during ↵Gravatar Matthieu Sozeau2014-05-16
| | | | | | the merge). Obligations are not necessarily opaque.
* Fix unification of non-unfoldable primitive projections in evarconv.Gravatar Matthieu Sozeau2014-05-16
|
* Fix second-order matching to properly check that the predicate found byGravatar Matthieu Sozeau2014-05-09
| | | | | abstraction has the right type. Fixes bug# 3306. Add test-suite files for bugs 3305 and 3306.
* - Add back some compatibility functions to avoid rewriting plugins.Gravatar Matthieu Sozeau2014-05-06
| | | | | - Fix in canonical structure inferce, we have to check that the heads are convertible and keep universe information around.
* - Fixes for canonical structure resolution (check that the initial term ↵Gravatar Matthieu Sozeau2014-05-06
| | | | | | | | indeed unifies with the projected term, keeping track of universes). - Fix the [unify] tactic to fail properly. - Fix unification to disallow lowering a global Type(i) universe to Prop or Set.
* In case two constants/vars/rels are _not_ defined, force unification of ↵Gravatar Matthieu Sozeau2014-05-06
| | | | | | | | | universes (better semantics for axioms, opaque constants). Conflicts: pretyping/evarconv.ml
* - Fix comparison of universes.Gravatar Matthieu Sozeau2014-05-06
| | | | | | - Shortcut for Set <= x checks, assuming that this is always true except when x (or rather its canonical representative) is Prop. Invariant to check. - Uncomment the profiling code and make it depend on a (statically known) boolean.