aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2016-09-02 00:24:53 +0200
committerPierre-Marie Pédrot2016-09-02 00:28:43 +0200
commitdef03f31c1c639629e6bb07e266319bf6930f8fb (patch)
treea49452925b94da614f06df0941892ea1af69ec58
parent1ae74bfd16f00bea0de14299cace8b638f768a70 (diff)
parentaf2df1ada04da94a41a400c637788db461a532d9 (diff)
Merge branch 'v8.5' into v8.6
-rw-r--r--plugins/micromega/coq_micromega.ml9
-rw-r--r--proofs/refine.ml2
-rw-r--r--stm/asyncTaskQueue.ml4
-rw-r--r--stm/lemmas.ml18
-rw-r--r--tactics/tactics.ml2
-rw-r--r--test-suite/.csdp.cachebin0 -> 79491 bytes
-rw-r--r--test-suite/bugs/closed/5043.v8
-rw-r--r--test-suite/csdp.cachebin79491 -> 0 bytes
-rw-r--r--theories/Compat/Coq84.v4
9 files changed, 35 insertions, 12 deletions
diff --git a/plugins/micromega/coq_micromega.ml b/plugins/micromega/coq_micromega.ml
index 42ea8c4592..faf3b3e69d 100644
--- a/plugins/micromega/coq_micromega.ml
+++ b/plugins/micromega/coq_micromega.ml
@@ -1880,7 +1880,7 @@ module Cache = PHashtable(struct
let hash = Hashtbl.hash
end)
-let csdp_cache = "csdp.cache"
+let csdp_cache = ".csdp.cache"
(**
* Build the command to call csdpcert, and launch it. This in turn will call
@@ -2026,9 +2026,9 @@ module CacheQ = PHashtable(struct
let hash = Hashtbl.hash
end)
-let memo_zlinear_prover = CacheZ.memo "lia.cache" (fun ((ce,b),s) -> lift_pexpr_prover (Certificate.lia ce b) s)
-let memo_nlia = CacheZ.memo "nlia.cache" (fun ((ce,b),s) -> lift_pexpr_prover (Certificate.nlia ce b) s)
-let memo_nra = CacheQ.memo "nra.cache" (fun (o,s) -> lift_pexpr_prover (Certificate.nlinear_prover o) s)
+let memo_zlinear_prover = CacheZ.memo ".lia.cache" (fun ((ce,b),s) -> lift_pexpr_prover (Certificate.lia ce b) s)
+let memo_nlia = CacheZ.memo ".nia.cache" (fun ((ce,b),s) -> lift_pexpr_prover (Certificate.nlia ce b) s)
+let memo_nra = CacheQ.memo ".nra.cache" (fun (o,s) -> lift_pexpr_prover (Certificate.nlinear_prover o) s)
@@ -2093,7 +2093,6 @@ let non_linear_prover_Z str o = {
pp_f = fun o x -> pp_pol pp_z o (fst x)
}
-
let linear_Z = {
name = "lia";
get_option = get_lia_option;
diff --git a/proofs/refine.ml b/proofs/refine.ml
index 76e2d7dc53..af9be78974 100644
--- a/proofs/refine.ml
+++ b/proofs/refine.ml
@@ -91,7 +91,7 @@ let refine ?(unsafe = true) f = Proofview.Goal.enter { enter = begin fun gl ->
(** Select the goals *)
let comb = CList.map_filter (Proofview.Unsafe.advance sigma) (CList.rev evs) in
let sigma = CList.fold_left Proofview.Unsafe.mark_as_goal sigma comb in
- let trace () = Pp.(hov 2 (str"refine"++spc()++ Hook.get pr_constrv env sigma c)) in
+ let trace () = Pp.(hov 2 (str"simple refine"++spc()++ Hook.get pr_constrv env sigma c)) in
Proofview.Trace.name_tactic trace (Proofview.tclUNIT ()) >>= fun () ->
Proofview.Unsafe.tclEVARS sigma >>= fun () ->
Proofview.Unsafe.tclSETGOALS comb
diff --git a/stm/asyncTaskQueue.ml b/stm/asyncTaskQueue.ml
index 73a90f6112..2d1f725ef0 100644
--- a/stm/asyncTaskQueue.ml
+++ b/stm/asyncTaskQueue.ml
@@ -229,10 +229,8 @@ module Make(T : Task) = struct
| (Die | TQueue.BeingDestroyed) ->
giveback_exec_token (); kill proc; exit ()
| Sys_error _ | Invalid_argument _ | End_of_file ->
- giveback_exec_token ();
T.on_task_cancellation_or_expiration_or_slave_death !last_task;
- kill proc;
- exit ()
+ giveback_exec_token (); kill proc; exit ()
end
module Pool = WorkerPool.Make(Model)
diff --git a/stm/lemmas.ml b/stm/lemmas.ml
index fb2f0351d2..b676f4f511 100644
--- a/stm/lemmas.ml
+++ b/stm/lemmas.ml
@@ -480,6 +480,18 @@ let start_proof_com kind thms hook =
(* Saving a proof *)
+let keep_admitted_vars = ref true
+
+let _ =
+ let open Goptions in
+ declare_bool_option
+ { optsync = true;
+ optdepr = false;
+ optname = "keep section variables in admitted proofs";
+ optkey = ["Keep"; "Admitted"; "Variables"];
+ optread = (fun () -> !keep_admitted_vars);
+ optwrite = (fun b -> keep_admitted_vars := b) }
+
let save_proof ?proof = function
| Vernacexpr.Admitted ->
let pe =
@@ -493,7 +505,8 @@ let save_proof ?proof = function
error "Admitted requires an explicit statement";
let typ = Option.get const_entry_type in
let ctx = Evd.evar_context_universe_context (fst universes) in
- Admitted(id, k, (const_entry_secctx, pi2 k, (typ, ctx), None), universes)
+ let sec_vars = if !keep_admitted_vars then const_entry_secctx else None in
+ Admitted(id, k, (sec_vars, pi2 k, (typ, ctx), None), universes)
| None ->
let pftree = Pfedit.get_pftreestate () in
let id, k, typ = Pfedit.current_proof_statement () in
@@ -502,7 +515,8 @@ let save_proof ?proof = function
let pproofs, _univs =
Proof_global.return_proof ~allow_partial:true () in
let sec_vars =
- match Pfedit.get_used_variables(), pproofs with
+ if not !keep_admitted_vars then None
+ else match Pfedit.get_used_variables(), pproofs with
| Some _ as x, _ -> x
| None, (pproof, _) :: _ ->
let env = Global.env () in
diff --git a/tactics/tactics.ml b/tactics/tactics.ml
index c9cec828c1..f47141efbc 100644
--- a/tactics/tactics.ml
+++ b/tactics/tactics.ml
@@ -4958,7 +4958,7 @@ module New = struct
let reduce_after_refine =
reduce
(Lazy {rBeta=true;rMatch=true;rFix=true;rCofix=true;rZeta=false;rDelta=false;rConst=[]})
- {onhyps=None; concl_occs=AllOccurrences }
+ {onhyps=Some []; concl_occs=AllOccurrences }
let refine ?unsafe c =
Refine.refine ?unsafe c <*>
diff --git a/test-suite/.csdp.cache b/test-suite/.csdp.cache
new file mode 100644
index 0000000000..75dd38fde8
--- /dev/null
+++ b/test-suite/.csdp.cache
Binary files differ
diff --git a/test-suite/bugs/closed/5043.v b/test-suite/bugs/closed/5043.v
new file mode 100644
index 0000000000..4e6a0f878f
--- /dev/null
+++ b/test-suite/bugs/closed/5043.v
@@ -0,0 +1,8 @@
+Unset Keep Admitted Variables.
+
+Section a.
+ Context (x : Type).
+ Definition foo : Type.
+ Admitted.
+End a.
+Check foo : Type.
diff --git a/test-suite/csdp.cache b/test-suite/csdp.cache
deleted file mode 100644
index 8e5708cf02..0000000000
--- a/test-suite/csdp.cache
+++ /dev/null
Binary files differ
diff --git a/theories/Compat/Coq84.v b/theories/Compat/Coq84.v
index 21b78b5337..8ae1a91958 100644
--- a/theories/Compat/Coq84.v
+++ b/theories/Compat/Coq84.v
@@ -76,3 +76,7 @@ Require Coq.Lists.List.
Require Coq.Vectors.VectorDef.
Notation " [ x ; .. ; y ] " := (cons x .. (cons y nil) ..) : list_scope.
Notation " [ x ; .. ; y ] " := (VectorDef.cons _ x _ .. (VectorDef.cons _ y _ (nil _)) ..) : vector_scope.
+
+(** In 8.4, the statement of admitted lemmas did not depend on the section
+ variables. *)
+Unset Keep Admitted Variables.