aboutsummaryrefslogtreecommitdiff
path: root/plugins
AgeCommit message (Collapse)Author
2015-12-07Fix some typos.Guillaume Melquiond
2015-11-19Fix bug #4433, removing hack on evars appearing in a pattern from aMatthieu Sozeau
constr, and the associated signature, not needed anymore. Update CHANGES, no evar_map is produced by pattern_of_constr anymore.
2015-11-18Fix a bug preventing the generation of graphs when doing multipleMatthieu Sozeau
pattern-matching on function calls.
2015-11-06Fixing complexity issue with f_equal. Thanks to J.-H. JourdanHugo Herbelin
for reporting it. A "cut" was not appropriately chained on the second goal but on both goals, with the chaining on the first goal introducing noise.
2015-10-28Univs: local names handling.Matthieu Sozeau
Keep user-side information on the names used in instances of universe polymorphic references and use them for printing.
2015-10-28Avoid type checking private_constants (side_eff) again during Qed (#4357).Enrico Tassi
Side effects are now an opaque data type, called private_constant, you can only obtain from safe_typing. When add_constant is called on a definition_entry that contains private constants, they are either - inlined in the main proof term but not re-checked - declared globally without re-checking them As a safety measure, the opaque data type contains a pointer to the revstruct (an internal field of safe_env that changes every time a new constant is added), and such pointer is compared with the current value store in safe_env when the private_constant is inlined. Only when the comparison is successful the private_constant is not re-checked. Otherwise else it is. In short, we accept into the kernel private constant only when they arrive in the very same order and on top of the very same env they arrived when we fist checked them. Note: private_constants produced by workers never pass the safety measure (the revstruct pointer is an Ephemeron). Sending back the entire revstruct is possible but: 1. we lack a way to quickly compare two revstructs, 2. it can be large.
2015-10-28Univs: fix bug #4375, accept universe binders on (co)-fixpointsMatthieu Sozeau
2015-10-28Do not pause globing in funind. (Fix bug #4382)Guillaume Melquiond
Since the functions of this plugin exit by raising exceptions, globing was never restarted. This prevented coqdoc from generating a proper output whenever some feature of this plugin was used. There does not seem to be any parsing of dynamic expressions, so pausing globing does not make much sense in the first place.
2015-10-19Partly fixes #3225. Removed some old experimental stuff in funind.Pierre Courtieu
2015-10-14Exporting the original unprocessed hint in the hint running function.Pierre-Marie Pédrot
2015-10-13Fix some typos.Guillaume Melquiond
2015-10-08f_equal fix continued: do a refresh_universes as before.Matthieu Sozeau
2015-10-07Fix bug #4069: f_equal regression.Matthieu Sozeau
2015-10-02Univs: fix after rebase (from_ctx/from_env)Matthieu Sozeau
2015-10-02Univs: fix evar_map initialization in newring.Matthieu Sozeau
2015-10-02Univs: fix evar_map leaks bugs in FunctionMatthieu Sozeau
The evar_map's that are used to typecheck terms must now always be initialized with the global universe graphs using Evd.from_env, so any failure to initialize and thread evar_map's correctly results in errors.
2015-10-02Univs: fix an evar leak in congruenceMatthieu Sozeau
2015-09-14Univs: Add universe binding lists to definitionsMatthieu Sozeau
... lemmas and inductives to control which universes are bound and where in universe polymorphic definitions. Names stay outside the kernel.
2015-09-03Improve directives for Haskell extraction of nat.Maxime Dénès
2015-09-03Fix [Z.div] and add [Z.modulo] in ExtrHaskellZNum.vNickolai Zeldovich
The previous extraction of [Z.div] for Haskell did not properly handle divide-by-zero. Fix it by introducing an explicit [if] statement in the generated Haskell code. Also, introduce a similar extraction rule for [Z.modulo], with the same check for modulo-by-zero.
2015-09-03Fix [Nat.div] and add [Nat.modulo] in ExtrHaskellNatNum.vNickolai Zeldovich
The previous extraction of [Nat.div] for Haskell did not properly handle divide-by-zero. Fix it by introducing an explicit [if] statement in the generated Haskell code. Also, introduce a similar extraction rule for [Nat.modulo], with the same check for modulo-by-zero.
2015-07-22Extraction: fix primitive projection extraction.Matthieu Sozeau
Use expand projection to come back to the projection-as-constant encoding, dealing with parameters correctly.
2015-06-22Add efficient extraction of [nat], [Z], and [string] to HaskellNickolai Zeldovich
This mirrors the existing extraction libraries for OCaml. One wart: the extraction for [string] requires that the Haskell code imports Data.Bits and Data.Char. Coq has no way to add extra import statements to the extracted code. So we have to rely on the user to somehow import these libraries (e.g., using the -pgmF ghc option). See also https://coq.inria.fr/bugs/show_bug.cgi?id=4189 Message to github robot: this commit closes #65
2015-05-13Safer typing primitives.Pierre-Marie Pédrot
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.
2015-05-11Rationalizing a bit the interface of Hints.Pierre-Marie Pédrot
2015-05-05Fix bug #4212, congruence forgetting about some universe constraints.Matthieu Sozeau
2015-04-23Remove almost all the uses of string concatenation when building error messages.Guillaume Melquiond
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.
2015-04-23Using tclZEROMSG instead of tclZERO in several places.Pierre-Marie Pédrot
2015-04-22Declarative mode: remaining goals are "given up" when closing blocks.Arnaud Spiwack
Restores the intended behaviour from v8.3 and earlier.
2015-04-15Remove dirty debug printing from funind.Maxime Dénès
2015-04-14Function now supports puniveresjforest
2015-04-14better debug in recdefjforest
2015-04-14Opaque implementation of auto tactics.Pierre-Marie Pédrot
We provide an eliminator ensuring that the AST will be used to build a tactic, so that we can stuff arbitrary things inside. An escape function is also provided for backward compatibility.
2015-04-13correction of a bug reported by Tristan Crolardjforest
2015-04-13Fixing bug #4186.Pierre-Marie Pédrot
2015-04-10Fix #3590 for good this time, by changing the API, change's argument nowMatthieu Sozeau
takes a variable substitution for matched variables in the (lhs) pattern, and uses the existing ist structure to pretype the rhs correcly, without having to deal with the volatile evars.
2015-04-09JSON extraction: make explicit each group of mutually-recursive fixpointsNickolai Zeldovich
2015-04-09JSON extraction: construct full names (dot-separated) in pp_globalNickolai Zeldovich
This is important to disambiguate identical names from different modules.
2015-04-09Add extraction to JSON.Nickolai Zeldovich
This patch allows Coq terms to be extracted into the widely used JSON format. This is useful in at least two cases: - One might want to manipulate Coq values outside of Coq, but without being forced to use one of the three existing extraction languages (OCaml, Haskell, or Scheme), and without having to compile Coq's extracted result. This is especially useful when a Coq evaluation produces some data structure that needs to be moved out of Coq. Having to invoke an OCaml/Haskell/Scheme compiler just to get a data structure out of Coq is somewhat awkward. - One might want to experiment with extracting Coq code into other languages (Go, Javascript, etc), without having to write the whole extraction logic in OCaml and recompile Coq's extraction plugin each time. This makes it easy to quickly prototype extraction in any language, without having to build Coq from source. Extraction to JSON is implemented by adding the JSON "pseudo-language" to the extraction facility. Thus, one can extract the JSON encoding of a single term using: Extraction Language JSON. Extraction qualid. and extract an entire Coq library "ident" into "ident.json" using: Extraction Language JSON. Extraction Library ident. Nota (Pierre Letouzey) : this is an updated version of the original PullRequest, updated to match recent changes in trunk
2015-04-08add ExtrHaskellBasic.v to mirror ExtrOcamlBasic.vNickolai Zeldovich
2015-04-08Fix specialized extraction of ascii characters into Haskell. (Fix bug #4181)Nickolai Zeldovich
The extraction machinery has specialized support for extracting [ascii] characters into native characters in the target language, as opposed to using an explicit constructor from 8 boolean bits. This works by hard-coding the name of the character type in the target language. Unfortunately, the hard-coded type for Haskell was "Char", not the fully-qualified "Prelude.Char". As a result, it was impossible to extract characters into Haskell without getting type errors about "Char". This patch changes this hard-coded name to "Prelude.Char".
2015-04-02Puts all the "import" statements first so as to accommodate the latest GHC.Nickolai Zeldovich
2015-04-02Fix some typos.Guillaume Melquiond
2015-04-02Define Any in Haskell extraction when Tunknown is used.Nickolai Zeldovich
Commit 84c2433a introduced the Any type alias as the Haskell extracted version of MiniML's Tunknown. However, the code to define the Any type alias was generated conditional on usf.magic. As it turns out, sometimes Tunknown appears even if usf.magic is false (i.e., even if MLmagic does not appear anywhere in the AST). This produced Haskell code that would not compile; e.g.: % coqtop Coq < Extraction Language Haskell. Coq < Extraction Library Datatypes. The file Datatypes.hs has been created by extraction. % ghc Datatypes.hs [1 of 1] Compiling Datatypes ( Datatypes.hs, Datatypes.o ) Datatypes.hs:261:17: Not in scope: type constructor or class `Any' Datatypes.hs:261:24: Not in scope: type constructor or class `Any' The fix is straightforward: produce the code that defines the Any type alias if usf.tunknown is true.
2015-04-01Accomodating #4166 (providing "Require Import OmegaTactic" as aHugo Herbelin
replacement for 8.4's "Require Omega").
2015-03-31Declarative mode: fix proof modes.Arnaud Spiwack
`end proof` changes the proof mode to `"Classic"`.
2015-03-31Declarative mode: fix vernac classification.Arnaud Spiwack
So that the commands are assigned the appropriate status of syntax-changing or not, as well as the proof mode they are setting.
2015-03-31Declarative mode: plug the specialised printers back.Arnaud Spiwack
It will not work in CoqIDE though, which handles printing its own way. It's a general remark that we have many ways of printing things in Coq and we should look for a unified structured framework to be shared between interfaces.
2015-03-25Correcting a bug introduced by universes polymorphismjforest
2015-03-25correcting a bug with aliased when using Functional Schemeforest