aboutsummaryrefslogtreecommitdiff
path: root/library
AgeCommit message (Collapse)Author
2015-12-03Univs: fix bug #4443.Matthieu Sozeau
Do not substitute rigid variables during minimization, keeping their equality constraints instead.
2015-11-27Univs: entirely disallow instantiation of polymorphic constants withMatthieu Sozeau
Prop levels. As they are typed assuming all variables are >= Set now, and this was breaking an invariant in typing. Only one instance in the standard library was used in Hurkens, which can be avoided easily. This also avoids displaying unnecessary >= Set constraints everywhere.
2015-11-27Avoid recording spurious Set <= Top.i constraints which are alwaysMatthieu Sozeau
valid (when Top.i is global and hence > Set).
2015-11-20Univs: fix type_of_global_in_context not returning instantiated universe ↵Matthieu Sozeau
contexts.
2015-10-30Add a way to get the right fix_exn in external vernacular commandsMatthieu Sozeau
involving Futures.
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-28lib_stack: API to reorder the libstackEnrico Tassi
For discharging it is important that constants occur in the libstack in an order that respects the dependencies among them. This is impossible to achieve for private constants when they are exported globally without this (ugly IMO) api.
2015-10-27Fix bugs 4389, 4390 and 4391 due to wrong handling of universe namesMatthieu Sozeau
structure.
2015-10-25Declaremods: replace two anomalies by user errors (fix #3974 and #3975)Pierre Letouzey
As shown by the code snippets in these bug reports, I've been too hasty in considering these situations as anomalies in commit 466c4cb (at least the one at the last line of consistency_checks). So let's turn these anomalies back to regular user errors, as they were before this commit.
2015-10-13Fix some typos.Guillaume Melquiond
2015-10-08Univs: fix bug #3807Matthieu Sozeau
Add a flag to disallow minimization to set
2015-10-08Goptions: new value type: optional stringEnrico Tassi
These options can be set to a string value, but also unset. Internal data is of type string option.
2015-10-02Univs: Change intf of push_named_def to return the computed universeMatthieu Sozeau
context Let-bound definitions can be opaque but the whole universe context was not gathered to be discharged at section closing time.
2015-10-02Univs: refined handling of assumptionsMatthieu Sozeau
According to their polymorphic/non-polymorphic status, which imply that universe variables introduced with it are assumed to be >= or > Set respectively in the following definitions.
2015-10-02Univs: fix minimization to allow lowering a universe to Set, not Prop.Matthieu Sozeau
2015-10-02Univs: fix Universe vernacular, fix bug #4287.Matthieu Sozeau
No universe can be set lower than Prop anymore (or Set).
2015-10-02Univs: minimization, adapt to graph invariants.Matthieu Sozeau
We are forced to declare universes that are global and appear in the local constraints as we start from an empty universe graph.
2015-10-02Forcing i > Set for global universes (incomplete)Matthieu Sozeau
2015-10-02Universes: enforce Set <= i for all Type occurrences.Matthieu Sozeau
2015-09-30Unexport Loadpath.get_paths.Guillaume Melquiond
2015-09-29Fix dumb typo.Guillaume Melquiond
2015-09-29Make the interface of System.raw_extern_intern much saner.Guillaume Melquiond
There is no reason (any longer?) to create simultaneous closures for interning and externing files. This patch makes the code more readable by separating both functions and their signatures.
2015-09-29Prevent States.intern_state and System.extern_intern from looking up files ↵Guillaume Melquiond
in the loadpath. This patch causes a bit of code duplication (because of the .coq suffix added to state files) but it makes it clear which part of the code is looking up files in the loadpath and for what purpose. Also it makes the interface of System.extern_intern and System.raw_extern_intern much saner.
2015-09-29Remove some uses of Loadpath.get_paths.Guillaume Melquiond
The single remaining use is in library/states.ml. This use should be reviewed, as it is most certainly broken. The other uses of Loadpath.get_paths did not disappear by miracle though. They were replaced by a new function Loadpath.locate_file which factors all the uses of the function. This function should not be used as it is as broken as Loadpath.get_paths, by definition. Vernac.load_vernac now takes a complete path rather than looking up for the file. That is the way it was used most of the time, so the lookup was unnecessary. For instance, Vernac.compile was calling Library.start_library which already expected a complete path. Another consequence is that System.find_file_in_path is almost no longer used (except for Loadpath.locate_file, obviously). The two remaining uses are System.intern_state (used by States.intern_state, cf above) and Mltop.dir_ml_load for dynamically loading compiled .ml files.
2015-09-28Make -load-vernac-object respect the loadpath.Guillaume Melquiond
This command-line option was behaving like the old -require, except that it did not do Import. In other words, it was loading files without respecting the loadpath. Now it behaves exactly like Require, while -require now behaves like Require Import. This patch also removes Library.require_library_from_file and all its dependencies, since they are no longer used inside Coq.
2015-09-25The -require option now accepts a logical path instead of a physical one.Pierre-Marie Pédrot
2015-09-25The -compile option now accepts ".v" files and outputs a warning otherwise.Pierre-Marie Pédrot
2015-09-23Hopefully better names to constructors of internal_flag, as discussedHugo Herbelin
with Enrico.
2015-09-20Nametab: print debug notice only in debug mode.Maxime Dénès
2015-09-03Add an if_verbose for "Fetching opaque proofs ..."mlasson
I do not think that this information is worth displaying without the verbose flag.
2015-07-16Fixing anomaly #3743 while printing an error message involving evar constraints.Hugo Herbelin
Indeed, the name of a bound variable was lost when unifying under a Prod in evarconv. The error message for "Unable to satisfy the following constraints" is still to be improved though.
2015-07-10Option -type-in-type: added support in checker and making it contaminatingHugo Herbelin
in vo files (this was not done yet in 24d0027f0 and 090fffa57b). Reused field "engagement" to carry information about both impredicativity of set and type in type. For the record: maybe some further checks to do around the sort of the inductive types in coqchk?
2015-07-10Native compiler: refactor code handling pre-computed values.Maxime Dénès
Fixes #4139 (Not_found exception with Require in modules).
2015-07-09Improve semantics of -native-compiler flag.Maxime Dénès
Since Guillaume's, launching coqtop without -native-compiler and call native_compute would mean recompiling silently all dependencies, even if they had been precompiled (e.g. the stdlib). The new semantics is that -native-compiler disables separate compilation of the current library, but still tries to load precompiled dependencies. If loading fails when the flag is on, coqtop stays silent.
2015-07-07Univs/minimization: Fix unused variable bug.Matthieu Sozeau
2015-06-29Assumptions: more informative print for False axiom (Close: #4054)Enrico Tassi
When an axiom of an empty type is matched in order to inhabit a type, do print that type (as if each use of that axiom was a distinct foo_subproof). E.g. Lemma w : True. Proof. case demon. Qed. Lemma x y : y = 0 /\ True /\ forall w, w = y. Proof. split. case demon. split; [ exact w | case demon ]. Qed. Print Assumptions x. Prints: Axioms: demon : False used in x to prove: forall w : nat, w = y used in w to prove: True used in x to prove: y = 0
2015-06-26Fix bug #4254 with the help of J.H. JourdanMatthieu Sozeau
1) We now _assign_ the smallest possible arities to mutual inductive types and eventually add leq constraints on the user given arities. Remove useless limitation on instantiating algebraic universe variables with their least upper bound if they have upper constraints as well. 2) Do not remove non-recursive variables when computing minimal levels of inductives. 3) Avoid modifying user-given arities if not necessary to compute the minimal level of an inductive. 4) We correctly solve the recursive equations taking into account the user-declared level.
2015-06-25Wrapped the declare_object function to pretty-print anomalies at loading time.Thomas Sibut-Pinote
2015-06-24On-demand Require.Pierre-Marie Pédrot
Marshalled libraries are only loaded when needed and dropped thereafter. This might be costly for Require inside modules, but such a practice is discouraged anyway.
2015-06-24Splitting the library representation on disk in two.Pierre-Marie Pédrot
The first part only contains the summary of the library, while the second one contains the effective content of it.
2015-06-11Fix bug #3446.Matthieu Sozeau
Wrong handling of algebraic universes that have upper bounds.
2015-05-27Fix bug #4159Matthieu Sozeau
Some asynchronous constraints between initial universes and the ones at the end of a proof were forgotten. Also add a message to print universes indicating if all the constraints are processed already or not.
2015-05-14Disable precompilation for native_compute by default.Guillaume Melquiond
Note that this does not prevent using native_compute, but it will force on-the-fly recompilation of dependencies whenever it is used. Precompilation is enabled for the standard library, assuming native compilation was enabled at configuration time. If native compilation was disabled at configuration time, native_compute falls back to vm_compute. Failure to precompile is a hard error, since it is now explicitly required by the user.
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-22Tactical `progress` compares term up to potentially equalisable universes.Arnaud Spiwack
Followup of: f7b29094fe7cc13ea475447bd30d9a8b942f0fef . In particular, re-closes #3593. As a side effect, fixes an undiscovered bug of the `eq_constr` tactic which didn't consider terms up to evar instantiation.
2015-04-17Extra fix to 934761875 and f4ee7ee31e4 on optimizing Import of severalHugo Herbelin
libraries at once (see #4193).
2015-04-09Strengthen minimization: it shouldn't set a universe u to a max if itMatthieu Sozeau
has a strict upper bound.
2015-04-02Make it possible for -R to override the existing implicit setting of a path.Guillaume Melquiond
Without this commit, passing "-R theories Coq" to "coqtop -nois" has no effect since "-Q theories Coq" has already been done implicitly.
2015-04-01From X Require Y looks for X with absolute path, disregarding -R.Pierre-Marie Pédrot