aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins
Commit message (Collapse)AuthorAge
* Abstract: "Qed export ident, .., ident" to preserve v8.4 behaviorGravatar Enrico Tassi2015-02-14
| | | | Of course such proofs cannot be processed asynchronously
* Univs: fix bug #3978: carry around the universe context used toGravatar Matthieu Sozeau2015-02-12
| | | | | typecheck with definitions and thread it accordingly when typechecking module expressions.
* Revert "Capital letter in plugins." (Sorry, was not intended to be pushed)Gravatar Hugo Herbelin2015-02-12
| | | | This reverts commit bff2b36cb0e2dbd02c4f181fba545a420e847767.
* Capital letter in plugins.Gravatar Hugo Herbelin2015-02-12
|
* Removing dead code.Gravatar Pierre-Marie Pédrot2015-02-02
|
* Fix previous commit on extraction.Gravatar Maxime Dénès2015-01-23
| | | | | Since name clashes are discovered by side effects, the order of traversal of module structs cannot be changed.
* Extraction: fix #3629.Gravatar Maxime Dénès2015-01-23
| | | | | | The control flow of extraction is hard to read due to exceptions. When meeting an inlined constant extracted to custom code, they could desynchronize some tables in charge of detecting name clashes, leading to an anomaly.
* Derive -> derive occurencesGravatar Pierre Boutillier2015-01-12
|
* Update headers.Gravatar Maxime Dénès2015-01-12
|
* Extraction: discard code unnecessary to fulfill a module signatureGravatar Pierre Letouzey2015-01-11
|
* Declarations.mli refactoring: module_type_body = module_bodyGravatar Pierre Letouzey2015-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | After this commit, module_type_body is a particular case of module_type. For a [module_type_body], the implementation field [mod_expr] is supposed to be always [Abstract]. This is verified by coqchk, even if this isn't so crucial, since [mod_expr] is never read in the case of a module type. Concretely, this amounts to the following rewrite on field names for module_type_body: - typ_expr --> mod_type - typ_expr_alg --> mod_type_alg - typ_* --> mod_* and adding two new fields to mtb: - mod_expr (always containing Abstract) - mod_retroknowledge (always containing []) This refactoring should be completely transparent for the user. Pros: code sharing, for instance subst_modtype = subst_module. Cons: a runtime invariant (mod_expr = Abstract) which isn't enforced by typing. I tried a polymorphic typing of mod_expr, to share field names while not having mtb = mb, but the OCaml typechecker isn't clever enough with polymorphic mutual fixpoints, and reject code sharing (e.g. between subst_modtype and subst_module). In the future (with ocaml>=4), some GADT could maybe help here, but for now the current solution seems good enough.
* Extraction: discard unnecessary code inside modules without signaturesGravatar Pierre Letouzey2015-01-11
| | | | | | | In the case of an inner module without explicit signature, (and not used later in a functor application), we now extract only the needed items (used later or asked by the user), instead of blindly extracting all fields as earlier.
* Extraction: no more ascii blob in type variables (fix #3227)Gravatar Pierre Letouzey2015-01-11
| | | | | | Since type variables are local to the definition, we simply rename them in case of unicode chars. We also get rid of any ' to avoid Ocaml illegal 'a' type var (clash with char litteral).
* Extraction : some more support functions for a future "Extraction Compute"Gravatar Pierre Letouzey2015-01-11
|
* Extraction: minor tweaks to ease ongoing experiments about LambdaGravatar Pierre Letouzey2015-01-11
| | | | | | - Common.get_native_char instead of just a pp function of this char - Enrich the record projection table
* Avoiding introducing yet another convention in naming files.Gravatar Hugo Herbelin2015-01-08
|
* kernel/ind Change interface of declare_mind and declare_mutualGravatar Matthieu Sozeau2015-01-05
| | | | | | 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.
* fix bug #2447 in congruenceGravatar Pierre Corbineau2014-12-16
|\
* | fix bug #2447 in congruenceGravatar Pierre Corbineau2014-12-16
| |
| * 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.
* handling Functional Scheme for required but not imported modulesGravatar Julien Forest2014-12-11
|
* Switch the few remaining iso-latin-1 files to utf8Gravatar Pierre Letouzey2014-12-09
|
* Closing bug 3837Gravatar Julien Forest2014-12-08
|
* Moving change_in_concl, change_in_hyp, change_concl to Proofview.tactic.Gravatar Hugo Herbelin2014-12-07
|
* Fix order of arguments in Extract Constant for Pos.compare_cont.Gravatar Maxime Dénès2014-11-25
|
* Writing Tactics.keep in the new monad.Gravatar Pierre-Marie Pédrot2014-11-21
|
* Fixing side bug in db37c9f3f32ae7 delaying interpretation of theGravatar Hugo Herbelin2014-11-16
| | | | | right-hand side of a "change with": the rhs lives in the toplevel environment.
* Fixing Functional Induction when applied to an alias (reference manualGravatar Hugo Herbelin2014-11-07
| | | | | | | | | | | | | 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.
* Removing the legacy intro tactic code.Gravatar Pierre-Marie Pédrot2014-11-07
|
* Writing the raw introduction tactic in the new monad.Gravatar Pierre-Marie Pédrot2014-11-05
|
* Writing rename_hyps in the new monad.Gravatar Pierre-Marie Pédrot2014-11-03
| | | | | This new implementation now allows for simultaneous replacing of hypotheses, thus fixing bug #2149.
* Don't raise an error when printing intro-patterns in [functional induction].Gravatar Arnaud Spiwack2014-11-01
|
* Feedback message: hold extra info to help routingGravatar Enrico Tassi2014-10-31
| | | | | PIDE based GUIs can take advantage of multiple panels and get some feedback routed there. E.g. query panel
* Haskell extraction: use explicit -XMagicHash instead of -fglasgow-extsGravatar Nickolai Zeldovich2014-10-28
| | | | | | | | | | | | 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).
* Haskell extraction: put unsafeCoerce type declaration laterGravatar Nickolai Zeldovich2014-10-28
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Removing an Evd.merge in Newring.Gravatar Pierre-Marie Pédrot2014-10-27
|
* Fix some typos in comments.Gravatar Guillaume Melquiond2014-10-27
|
* This commit introduces changes in induction and destruct.Gravatar Hugo Herbelin2014-10-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 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.
* Bugfix 3604 : more robust Unix.lockfGravatar Frédéric Besson2014-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.
* Remove the deprecated open-constr based refine.Gravatar Arnaud Spiwack2014-10-22
| | | | | | | | 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.
* 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.
* Revert "Fixing a loop in proof reconstruction for congruence (#2447)."Gravatar Hugo Herbelin2014-10-17
| | | | | | | 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.
* Fixing a loop in proof reconstruction for congruence (#2447).Gravatar Hugo Herbelin2014-10-17
| | | | | | | | | | | | | | 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.
* library/opaqueTables: enable their use in interactive modeGravatar Enrico Tassi2014-10-13
| | | | | | | | | | | | | | 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
* 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.
* Restoring plugins/xml/README erased by mistake.Gravatar Hugo Herbelin2014-10-09
|
* 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.