aboutsummaryrefslogtreecommitdiffhomepage
path: root/tactics/rewrite.ml
Commit message (Collapse)AuthorAge
* With the field record punning syntax.Gravatar Theo Zimmermann2015-06-23
|
* Put all arguments of strategy in record.Gravatar Theo Zimmermann2015-06-23
|
* Strategy is now a record type with a function field.Gravatar Theo Zimmermann2015-06-23
|
* Add comments.Gravatar Theo Zimmermann2015-06-23
|
* Safer typing primitives.Gravatar Pierre-Marie Pédrot2015-05-13
| | | | | | | | | | | | | | | | Some functions from pretyping/typing.ml and their derivatives were potential source of evarmap leaks, as they dropped their resulting evarmap. This commit clarifies the situation by renaming them according to a unsafe_* scheme. Their sound variant is likewise renamed to their old name. The following renamings were made. - Typing.type_of -> unsafe_type_of - Typing.e_type_of -> type_of - A new e_type_of function that matches the e_ prefix policy - Tacmach.pf_type_of -> pf_unsafe_type_of - A new safe pf_type_of function. All uses of unsafe_* functions should be eventually eliminated.
* Fixing bug #4232.Gravatar Pierre-Marie Pédrot2015-05-11
| | | | | | | We beta-iota normalize the type of the rewriting predicate to ensure that the non-dependency in the arrow argument is meaningful. Otherwise, terms of the form "forall x : A, (fun _ : A => P) x" generated by the retyping would confuse the non-dependency heuristic.
* Removing dead code in Rewrite.Gravatar Pierre-Marie Pédrot2015-05-05
| | | | | The hypinfo cache was actually always set to None, so that there was no need to try to preserve it if it was set to an actual value.
* Remove almost all the uses of string concatenation when building error messages.Gravatar Guillaume Melquiond2015-04-23
| | | | | | Since error messages are ultimately passed to Format, which has its own buffers for concatenating strings, using concatenation for preparing error messages just doubles the workload and increases memory pressure.
* Fix bug #3938Gravatar Matthieu Sozeau2015-02-18
|
* Fixing bug #3944.Gravatar Pierre-Marie Pédrot2015-02-16
|
* Fixing bug #4016.Gravatar Pierre-Marie Pédrot2015-02-14
| | | | | When setoid rewriting in a hypothesis, we push the newly introduced declaration after the last declaration it depends on.
* Tentative workaround for bug #3798.Gravatar Pierre-Marie Pédrot2015-01-24
| | | | Ultimately setoid rewrite should be written in the monad to fix it properly.
* Update headers.Gravatar Maxime Dénès2015-01-12
|
* Fix setoid rewrite.Gravatar Arnaud Spiwack2015-01-06
| | | Because of f66b84de608830600e43f6d1a97c29226b6b58ea (Refine primitive: [unsafe] is now true by default), setoid rewrite could produce ill-typed term. Since setoid rewrite relies on the checks of refine to ensure well-typed, turned the check explicitely on with [~unsafe:false].
* Getting rid of Exninfo hacks.Gravatar Pierre-Marie Pédrot2014-12-16
| | | | | | | | | | | | | | | | | | | | Instead of modifying exceptions to wear additional information, we instead use a dedicated type now. All exception-using functions were modified to support this new type, in particular Future's fix_exn-s and the tactic monad. To solve the problem of enriching exceptions at raise time and recover this data in the try-with handler, we use a global datastructure recording the given piece of data imperatively that we retrieve in the try-with handler. We ensure that such instrumented try-with destroy the data so that there may not be confusion with another exception. To further harden the correction of this structure, we also check for pointer equality with the last raised exception. The global data structure is not thread-safe for now, which is incorrect as the STM uses threads and enriched exceptions. Yet, we splitted the patch in two parts, so that we do not introduce dependencies to the Thread library immediatly. This will allow to revert only the second patch if ever we switch to OCaml-coded lightweight threads.
* For compatibility purpose, when setoid_rewriting a hypothesis, beta-iotaGravatar Pierre-Marie Pédrot2014-12-02
| | | | normalize it afterwards.
* More invariants in the code of Rewrite.Gravatar Pierre-Marie Pédrot2014-12-01
| | | | | In particular, the old hypinfo is made as a proper cache, preventing dynamic tricks to decide whether it was rightful to refresh it.
* Set use_evars_eagerly_in_conv_on_closed_terms in rewrite_unif_flags too.Gravatar Hugo Herbelin2014-11-30
| | | | This allows to have the example in test setoid_unif.v to work again.
* Attempt to organize and document unification flags of setoid rewrite.Gravatar Hugo Herbelin2014-11-22
|
* In setoid_rewrite error messages:Gravatar Hugo Herbelin2014-11-22
| | | | | | - removed the encapsulation in a Tactic Failure (I don't see why setoid_rewrite should specifically raise a Fail - do I miss something?) - avoid having twice a "Unable to satisfy ... constraints" message.
* Fix resolve_morphism to build well-scoped terms in case some argumentsGravatar Matthieu Sozeau2014-11-22
| | | | of the function are dependent.
* Tentative rephrasing of error message for rewrite.Gravatar Hugo Herbelin2014-11-18
|
* Replugging hints in rewriting strategies.Gravatar Pierre-Marie Pédrot2014-11-10
|
* Follow up to experimental eager evar unification in bcba6d1bc9:Gravatar Hugo Herbelin2014-11-08
| | | | | | | | | Observing that systematic eager evar unification makes unification works better, for instance in setoid rewrite (ATBR, SemiRing.v), we add a new flag use_evars_eagerly_in_conv_on_closed_terms which is put to true only in Rewrite.rewrite_core_unif_flags (empirically, this makes the "rewrite" from rewrite.ml working again on examples which were previously treated by use_metas_eagerly_in_conv_on_closed_terms).
* Cleaning and documenting Clenv.make_evar_clauseGravatar Pierre-Marie Pédrot2014-10-27
|
* Preventing potential evar leak in Rewrite.Gravatar Pierre-Marie Pédrot2014-10-26
|
* Change reduction_of_red_expr to return an e_reduction_function returningGravatar Matthieu Sozeau2014-10-24
| | | | | | an updated evar_map, as pattern is working up to universe equalities that must be kept. Straightforward adaptation of the code depending on this.
* Proofview: move more functions to the Unsafe module.Gravatar Arnaud Spiwack2014-10-22
|
* Proofview: split [V82] module into [Unsafe] and [V82].Gravatar Arnaud Spiwack2014-10-22
| | | | The Unsafe module is for unsafe tactics which cannot be done without anytime soon. Whereas V82 indicates a function which we want to get rid of and that shouldn't be used in a new function.
* Lemmas/Pfedit: use full evar_map instead of universe contexts to start proofs.Gravatar Arnaud Spiwack2014-10-22
| | | As simple as this looks, there's been some quite subtle issues in doing this modification, there may be bugs left.
* Removing dead code in Rewrite.Gravatar Pierre-Marie Pédrot2014-10-21
|
* Small invariants in Rewrite code.Gravatar Pierre-Marie Pédrot2014-10-21
|
* Fixing decompose_app_rel in Rewrite.Gravatar Pierre-Marie Pédrot2014-10-21
| | | | | The old implementation did not beta-iota normalize before observing the head of the term, resulting in stange bugs.
* Using new clausenv in rewrite.Gravatar Pierre-Marie Pédrot2014-10-21
|
* Proofview.Refine: remove the handle type, and simplify the API.Gravatar Arnaud Spiwack2014-10-16
| | | | | | Now, usual function from Evarutil are used to define evars instead of the variants from Proofview.Refine. The [update] primitive which tried to patch the difference between pretyping functions and the refine primitive is now replaced by the identity function.
* A version of convert_concl and convert_hyp in new proof engine.Gravatar Hugo Herbelin2014-10-09
| | | | | Not very optimized though (if we apply convert_hyp on any hyp, a new evar will be generated for every different hyp...).
* Splitting out of auto.ml a file hints.ml dedicated to hints so as toGravatar Hugo Herbelin2014-10-07
| | | | | | being able to export hints without tactics, vm, etc. to come with. Some functions moved to the new proof engine.
* Semantic fix of a refine in Rewrite.Gravatar Pierre-Marie Pédrot2014-10-05
| | | | | This code was wrong but luckily unused. It instantiated an evar with an instance where the let-in bindings were removed.
* Add syntax for naming new goals in refine: writing ?[id] instead of _Gravatar Hugo Herbelin2014-09-30
| | | | | | | | 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.
* ATBR can't compile without the fix, as it uses setoid_rewrite to rewriteGravatar Matthieu Sozeau2014-09-23
| | | | under binders. This might incur a significant time penalty.
* Fix bug in setoid_rewrite introduced by PMP's commits, which was creatingGravatar Matthieu Sozeau2014-09-23
| | | | | | two versions of the rewriting lemma, keeping useless evars around. This can now happen only when the rewrite lemma is used under binders... Fix to do next.
* Rewrite.apply_lemma is written in state passing style.Gravatar Pierre-Marie Pédrot2014-09-21
| | | | This removes a use of Evd.merge.
* More invariants in the code of Refine.Gravatar Pierre-Marie Pédrot2014-09-21
| | | | | | | The hypinfo state is now refreshed at a proper time, which should reduce the overall number of calls to [decompose_applied_relation]. The state passing nature of the program is also more explicit, removing a use of Evd.merge. This patch should preserve semantics and efficiency.
* Removing a nonsensical Errors.push.Gravatar Pierre-Marie Pédrot2014-09-21
|
* A small pass of code cleaning and clenv removing in Rewrite.Gravatar Pierre-Marie Pédrot2014-09-15
|
* Rework typeclass resolution and control of backtracking.Gravatar Matthieu Sozeau2014-09-15
| | | | | | | Add a global option to check for multiple solutions and fail in that case. Add another flag to declare classes as having unique instances (not checked but assumed correct, avoiding some backtracking).
* Removing one Evd.merge in Rewrite.Gravatar Pierre-Marie Pédrot2014-09-15
|
* More invariants in Rewrite unification.Gravatar Pierre-Marie Pédrot2014-09-15
|
* The unifying functions of Rewrite uses the return types of strategies.Gravatar Pierre-Marie Pédrot2014-09-15
|
* Splitting the uses of the unification function according to the status ofGravatar Pierre-Marie Pédrot2014-09-15
| | | | the abs flag in rewrite.