aboutsummaryrefslogtreecommitdiff
path: root/plugins
AgeCommit message (Collapse)Author
2015-01-05kernel/ind Change interface of declare_mind and declare_mutualMatthieu Sozeau
Removing unused argument and fixing bug #3899, now warning when a record cannot be made primitive in Set Primitive Projections mode because it has no projection or at least one undefinable projection.
2014-12-16fix bug #2447 in congruencePierre Corbineau
2014-12-16fix bug #2447 in congruencePierre Corbineau
2014-12-16Getting rid of Exninfo hacks.Pierre-Marie Pédrot
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.
2014-12-11handling Functional Scheme for required but not imported modulesJulien Forest
2014-12-09Switch the few remaining iso-latin-1 files to utf8Pierre Letouzey
2014-12-08Closing bug 3837Julien Forest
2014-12-07Moving change_in_concl, change_in_hyp, change_concl to Proofview.tactic.Hugo Herbelin
2014-11-25Fix order of arguments in Extract Constant for Pos.compare_cont.Maxime Dénès
2014-11-21Writing Tactics.keep in the new monad.Pierre-Marie Pédrot
2014-11-16Fixing side bug in db37c9f3f32ae7 delaying interpretation of theHugo Herbelin
right-hand side of a "change with": the rhs lives in the toplevel environment.
2014-11-07Fixing Functional Induction when applied to an alias (reference manualHugo Herbelin
for Functional Induction was failing because of minus now an alias). Knowing that minus is an alias for Sub.nat, there are still two bugs in Functional Induction (Pierre or Julien?): "Functional Scheme minus_ind := Induction for minus Sort Prop." is failing when Nat is not imported. "functional induction (minus n m)" is failing because looking for sub_ind while the scheme is named minus_ind.
2014-11-07Removing the legacy intro tactic code.Pierre-Marie Pédrot
2014-11-05Writing the raw introduction tactic in the new monad.Pierre-Marie Pédrot
2014-11-03Writing rename_hyps in the new monad.Pierre-Marie Pédrot
This new implementation now allows for simultaneous replacing of hypotheses, thus fixing bug #2149.
2014-11-01Don't raise an error when printing intro-patterns in [functional induction].Arnaud Spiwack
2014-10-31Feedback message: hold extra info to help routingEnrico Tassi
PIDE based GUIs can take advantage of multiple panels and get some feedback routed there. E.g. query panel
2014-10-28Haskell extraction: use explicit -XMagicHash instead of -fglasgow-extsNickolai Zeldovich
When Coq's Haskell extraction needs to use unsafeCoerce, it passes the -fglasgow-exts option to GHC, but recent versions of GHC warn against this: xx.hs:1:16: Warning: -fglasgow-exts is deprecated: Use individual extensions instead This patch does as the warning suggests, replacing -fglasgow-exts with the specific option that the extraction needs (-XMagicHash).
2014-10-28Haskell extraction: put unsafeCoerce type declaration laterNickolai Zeldovich
When Haskell extraction requires magic type coersion, Coq produces the following code: unsafeCoerce :: a -> b #ifdef __GLASGOW_HASKELL__ import qualified GHC.Base unsafeCoerce = GHC.Base.unsafeCoerce# #else -- HUGS import qualified IOExts unsafeCoerce = IOExts.unsafeCoerce #endif GHC version 7.6.3 does not allow imports after a type declaration, and produces this error: xx.hs:20:1: parse error on input `import' (referring to the first import statement above). This patch moves the unsafeCoerce type declaration to just after the import statement, fixing this compile error.
2014-10-27Removing an Evd.merge in Newring.Pierre-Marie Pédrot
2014-10-27Fix some typos in comments.Guillaume Melquiond
2014-10-25This commit introduces changes in induction and destruct.Hugo Herbelin
The main change is that selection of subterm is made similar whether the given term is fully applied or not. - The selection of subterm now works as follows depending on whether the "at" is given, of whether the subterm is fully applied or not, and whether there are incompatible subterms matching the pattern. In particular, we have: "at" given | subterm fully applied | | incompatible subterms | | | Y Y - it works like in 8.4 Y N - this was broken in 8.4 ("at" was ineffective and it was finding all subterms syntactically equal to the first one which matches) N Y Y it now finds all subterms like the first one which matches while in 8.4 it used to fail (I hope it is not a too risky in-draft for a semantics we would regret...) (e.g. "destruct (S _)" on goal "S x = S y + S x" now selects the two occurrences of "S x" while it was failing before) N Y N it works like in 8.4 N N - it works like in 8.4, selecting all subterms like the first one which matches - Note that the "historical" semantics, when looking for a subterm, to select all subterms that syntactically match the first subterm to match the pattern (looking from left to right) is now internally called "like first". - Selection of subterms can now find the type by pattern-matching (useful e.g. for "induction (nat_rect _ _ _ _)") - A version of Unification.w_unify w/o any conversion is used for finding the subterm: it could be easily replaced by an other matching algorithm. In particular, "destruct H" now works on a goal such as "H:True -> x<=y |- P y". Secondary change is in the interpretation of terms with existential variables: - When several arguments are given, interpretation is delayed at the time of execution - Because we aim at eventually accepting "edestruct c" with unresolved holes in c, we need the sigma obtained from c to be an extension of the sigma of the tactics, while before, we just type-checked c independently of the sigma of the tactic - Finishing the resolution of evars (using type classes, candidates, pending conversion problems) is made slightly cleaner: it now takes three states: a term is evaluated in state sigma, leading to state sigma' >= sigma, with evars finally solved in state sigma'' >= sigma'; we solve evars in the diff of sigma' and sigma and report the solution in sigma'' - We however renounce to give now a success semantics to "edestruct c" when "c" has unresolved holes, waiting instead for a decision on what to do in the case of a similar eapply (see mail to coqdev). An auxiliary change is that an "in" clause can be attached to each component of a "destruct t, u, v", etc. Incidentally, make_abstraction does not do evar resolution itself any longer.
2014-10-24Change reduction_of_red_expr to return an e_reduction_function returningMatthieu Sozeau
an updated evar_map, as pattern is working up to universe equalities that must be kept. Straightforward adaptation of the code depending on this.
2014-10-22Bugfix 3604 : more robust Unix.lockfFrédéric Besson
2014-10-22Proofview: split [V82] module into [Unsafe] and [V82].Arnaud Spiwack
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.
2014-10-22Remove the deprecated open-constr based refine.Arnaud Spiwack
That is [Tactics.New.refine]. Replaced it with a wrapper around the primitive refine [Proofview.Refine.refine], but with extra reductions on the resulting goals. There was two used of this refine: one in the declarative mode, and one in type classes. The porting of the latter is likely to have introduced bugs. Factored code with Ltac's refine in Extratactics.
2014-10-22Lemmas/Pfedit: use full evar_map instead of universe contexts to start proofs.Arnaud Spiwack
As simple as this looks, there's been some quite subtle issues in doing this modification, there may be bugs left.
2014-10-17Revert "Fixing a loop in proof reconstruction for congruence (#2447)."Hugo Herbelin
committed by mistake. The message pretended to have a fix which is only superficially a fix. The problem is more complex. This reverts commit 251218905daea0838a3738466afa1c278bb3e81b.
2014-10-17Fixing a loop in proof reconstruction for congruence (#2447).Hugo Herbelin
Proofs of C t1..tn+1 = C t1..tn+1, even when the terms were syntactically the same, were built by composition of a proof of C t1..tn = C t1..tn with a proof of reflexivity of tn+1. The latter was reduced to showing C t1..tn = C u1..un for C u1..un the canonical representant of C t1..tn in its congruence class. But if some pair ti=ui was derivable by injectivity of the constructor C, it might go back to find a proof of C t1..tn+1 = C t1..tn+1 again, while a simple reflexivity proof was enough here. Not sure that the fix prevents any further loop in this part of the code though.
2014-10-13library/opaqueTables: enable their use in interactive modeEnrico Tassi
Before this patch opaque tables were only growing, making them unusable in interactive mode (leak on Undo). With this patch the opaque tables are functional and part of the env. I.e. a constant_body can point to the proof term in 2 ways: 1) directly (before the constant is discharged) 2) indirectly, via an int, that is mapped by the opaque table to the proof term. This is now consistent in batch/interactive mode This is step 0 to make an interactive coqtop able to dump a .vo/.vi
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-09Restoring plugins/xml/README erased by mistake.Hugo Herbelin
2014-10-09A version of convert_concl and convert_hyp in new proof engine.Hugo Herbelin
Not very optimized though (if we apply convert_hyp on any hyp, a new evar will be generated for every different hyp...).
2014-10-07Splitting out of auto.ml a file hints.ml dedicated to hints so as toHugo Herbelin
being able to export hints without tactics, vm, etc. to come with. Some functions moved to the new proof engine.
2014-10-06decl_mode: stay in declarative modeEnrico Tassi
This solution is a bit dumb, but I guess does what one expects. Each decl mode proof commands stays in proof mode.
2014-10-01Simpl less (so that cbn will not simpl too much)Pierre Boutillier
2014-10-01Fix cbn behavior wrt simpl no matchPierre Boutillier
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-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-27Add a boolean to indicate the unfolding state of a primitive projection,Matthieu Sozeau
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.
2014-09-25Revert changes of commit 4e1135fb315eab7 over file "plugins/micromega/sos.ml",Xavier Clerc
as "||" is actually redefined in "plugins/micromega/sos_lib.ml".
2014-09-25Remove some 'deprecated' warnings.Xavier Clerc
2014-09-22Correction of error message (bug 3359)Julien Forest
2014-09-22Fixing bug 3951Julien Forest
2014-09-17Revert specific syntax for primitive projections, avoiding uglyMatthieu Sozeau
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.
2014-09-15Add a "Hint Mode ref (+ | -)*" hint for setting a global modeMatthieu Sozeau
of resulution for goals whose head is "ref". + means the argument is an input and shouldn't contain an evar, otherwise resolution fails. This generalizes the Typeclasses Strict Resolution option which prevents resolution to fire on underconstrained typeclass constraints, now the criterion can be applied to specific parameters. Also cleanup auto/eauto code, uncovering a potential backwards compatibility issue: in cases the goal contains existentials, we never use the discrimination net in auto/eauto. We should try to set this on once the contribs are stabilized (the stdlib goes through when the dnet is used in these cases).
2014-09-12Uniformisation of the order of arguments env and sigma.Hugo Herbelin
2014-09-12Referring to evars by names. Added a parser for evars (but parsing ofHugo Herbelin
instances still to do). Using heuristics to name after the quantifier name it comes. Also added a "sigma" to almost all printing functions.
2014-09-12Discontinued xml plugin: improve the README.Arnaud Spiwack
More information, less pmp.
2014-09-08Removing the XML plugin.Pierre-Marie Pédrot
Left a README, just in case someone will discover the remnants of it decades from now.