aboutsummaryrefslogtreecommitdiff
path: root/pretyping
AgeCommit message (Collapse)Author
2014-10-16Move the handling of the principal evar from refine to evd.Arnaud Spiwack
See previous commit for more discussion. Changed the name from "main" to "principal" because I find "main" overused, and because the name was only introduced yesterday anyway.
2014-10-16Move the handling a new evars from the [Proofview.Refine] module to [Evd].Arnaud Spiwack
That way, everything in the code of pretying is made "refine"-aware. Making the abstraction stonger and integration of pretyping with interactive proof more direct. It might create goals in a slightly different goal order in the (user level) refine tactic. Because now, the [update] primitive which used to infer an order from an [evar_map] now has the order fixed by the successive declaration with [Evarutil.new_evar] (and similar). It probably coincides, though. Following a suggestion by Hugo.
2014-10-16Evd: a few comments to document the increasingly wide internal [evar_map] type.Arnaud Spiwack
2014-10-16Evd: remove/update obsolete comments.Arnaud Spiwack
2014-10-15To stay closer to non-primitive projections, only unfold primitiveMatthieu Sozeau
projections in cbv when delta _and_ beta flags are set. Add test-suite file for bug 3700 too.
2014-10-15Make use of unfolded primitive projections when elaborating match on aMatthieu Sozeau
primitive record.
2014-10-15Fix bug 3637.Matthieu Sozeau
2014-10-15Reenable FO unification of primitive projections and their eta-expandedMatthieu Sozeau
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.
2014-10-15Modify the heuristic for unfolding lhs or rhs in evarconv, consideringMatthieu Sozeau
folded primitive projections in applicative stacks in rhs as named, hence prefering to unfold the lhs in these cases.
2014-10-15Implement a different strategy to expand primitive projections only whenMatthieu Sozeau
required, i.e. in first-order unification cases where the head of the other side is a hole or the eta-expanded constant.
2014-10-15Add an option to not print primitive projection parameters, which canMatthieu Sozeau
make printing exponentially slower. We would have to expand all projections at once before detyping to make this linear.
2014-10-14Oops, forgot a fix needed after the rebase.Matthieu Sozeau
2014-10-14Fix bug #3698: stack overflow due to eta+canonical structures inMatthieu Sozeau
unification.
2014-10-13Adding a tactic which fails if one of the goals under focus is dependent in ↵Hugo Herbelin
another one.
2014-10-13Moving function about locs in locusops.Hugo Herbelin
2014-10-13English typo in a function name of evarconv.Hugo Herbelin
2014-10-13Added support for several impossible cases in compilation of "match".Hugo Herbelin
2014-10-12Tentative fix for a badly used Option.get in Reductionops.Pierre-Marie Pédrot
2014-10-11Revert d0cd27e209be08ee51a2d609157367f053438a10: giving a different nameMatthieu Sozeau
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.
2014-10-10Do not expand primitive projections eagerly in evarconv, but onlyMatthieu Sozeau
in cases of unification with existentials requiring it.
2014-10-10Add debug printers for projections, fix printing of evar constraintsMatthieu Sozeau
and unsatisfiable constraints which were not done in the right environment.
2014-10-10Add a "Debug Tactic Unification" option and correct the first-orderMatthieu Sozeau
application case to expand primitive projections at the head of both applications.
2014-10-10Make constrMatching and detyping more robust with respect toMatthieu Sozeau
expand_projection failing if an innapropriate sigma is given.
2014-10-10Fix bug due to shadowing a variable name in tacredMatthieu Sozeau
2014-10-08fix make mlidocPierre Boutillier
2014-10-08Fixing the anomaly in bug #3045 (a filter was not type-safe inHugo Herbelin
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.
2014-10-07Build unfolded versions of the primitive projection in let (a, p) := ...Matthieu Sozeau
to maintain compatibility (HoTT bug #557).
2014-10-07Avoid a warning with Meta's names in debugger.Hugo Herbelin
2014-10-05A few improvements on pattern-matching compilation.Hugo Herbelin
- Optimize the removal of generalization when there is no dependency in the generalized variable (see postprocess_dependencies, and the removal of dependencies in the default type of impossible cases). - Compute the onlydflt flag correctly (what allows automatic treatment of impossible cases even when there is no clause at all).
2014-10-04A few Global.env removed.Hugo Herbelin
2014-10-03Fixing ennoying warning about evars named ?23 and so on.Hugo Herbelin
2014-10-03Fixing #3623 (unbound evars in types in a call to "change with").Hugo Herbelin
2014-10-03Fixing #3634 (wrong env in "cannot instantiate because not in itsHugo Herbelin
scope" error message).
2014-10-02Fixing interpretation of constr under binders which was broken afterHugo Herbelin
it became possible to have binding names themselves bound to ltac variables (2fcc458af16b).
2014-10-02Completing fixing order of parameters when translating fromHugo Herbelin
glob_constr to constr_pattern. Was partially fixed to solve #3088 (8e88b7adab) in but the order of lambdas was still incorrect as the fix of the order of lambdas in second-order pattern-matching for #3136 showed (83159124ce22).
2014-10-02Work around issues with FO unification trying to unify terms ofMatthieu Sozeau
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.
2014-10-02Fix treatment of projections in Cst_stacks and unfolding behavior in evarconv.Matthieu Sozeau
2014-10-01Fix cbn behavior wrt simpl no matchPierre Boutillier
2014-10-01Fix the refolding by cbn of mutal constants defined in not included modulesPierre Boutillier
2014-10-01Fixing new failure of #3017 after 012fe1a96ba81ab (Referring to evarsHugo Herbelin
by names): VarInstance behaves like GoalEvar for type class resolution.
2014-10-01Fixing use of arguments renaming in apply which was broken afterHugo Herbelin
reorganization of apply in d5fece25d8964d5d9fcd55b66164286aeef5fb9f: using renaming also in retyping.
2014-09-30Seeing IntroWildcard as an action intro pattern rather than as a naming patternHugo Herbelin
(the action is "clear"). Added subst_intropattern which was missing since the introduction of ApplyOn intro patterns. Still to do: make "intros _ ?id" working without interferences when "id" is precisely the internal name used for hypotheses to discard.
2014-09-30Add syntax for naming new goals in refine: writing ?[id] instead of _Hugo Herbelin
will name the goal id; writing ?[?id] will use the first fresh name available based with prefix id. Tactics intro, rename, change, ... from logic.ml now preserve goal name; cut preserves goal name on its main premise.
2014-09-30Simplify evarconv thanks to new delta status of projections,Matthieu Sozeau
using whd_state_gen to handle unfolding. Add an isProj/destProj in term. Use the proper environment everywhere in unification.ml.
2014-09-29Merging some functions from evarutil.ml/evd.ml.Hugo Herbelin
- Removed collect_evars which does not consider instance (use evars_of_term instead). - Also removed evars_of_evar_info which did not filter context (use evars_of_filterered_evar_info instead). This is consistent with printing goal contexts in the filtered way. Anyway, as of today, afaics goals filters are trivial because (if I interpret evarutil.ml correctly), evars with non-trivial filter necessarily occur in a conv pb. Conversely, conv pbs being solved when tactics are called, there should not be an evar used as a goal with a non-trivial filter.
2014-09-29Restoring non-uniform delta on local and global constants in 2nd orderHugo Herbelin
unification for apply (compatibility reason). Waiting for another way to provide a more uniform scheme by default (keyed unification?).
2014-09-29In evarconv and unification, expand folded primitive projections toMatthieu Sozeau
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.
2014-09-27Keyed unification option, compiling the whole standard libraryMatthieu Sozeau
(but deactivated still). Set Keyed Unification to activate the option, which changes subterm selection to _always_ use full conversion _after_ finding a subterm whose head/key matches the key of the term we're looking for. This applies to rewrite and higher-order unification in apply/elim/destruct. Most proof scripts already abide by these semantics. For those that don't, it's usually only a matter of using: Declare Equivalent Keys f g. This make keyed unification consider f and g to match as keys. This takes care of most cases of abbreviations: typically Def foo := bar and rewriting with a bar-headed lhs in a goal mentioning foo works once they're set equivalent. For canonical structures, these hints should be automatically declared. For non-global-reference headed terms, the key is the constructor name (Sort, Prod...). Evars and metas are no keys. INCOMPATIBILITIES: In FMapFullAVL, a Function definition doesn't go through with keyed unification on.
2014-09-27Index keys instead of simply global references.Matthieu Sozeau
2014-09-27First version of keyed subterm selection in unification.Matthieu Sozeau