aboutsummaryrefslogtreecommitdiff
path: root/proofs/logic.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2020-05-12 12:13:50 +0200
committerPierre-Marie Pédrot2020-05-12 12:18:19 +0200
commit65551cdf811a1bf428fcdc7e3e5c51df0fffcb78 (patch)
tree995028e052cf0e8b37214d18462dc1ce4c5e8067 /proofs/logic.ml
parentd31cb4d3e55da99d42abdc1f4129ddc03e1631c6 (diff)
Wrap the legacy refiner type into the Logic API.
Diffstat (limited to 'proofs/logic.ml')
-rw-r--r--proofs/logic.ml13
1 files changed, 11 insertions, 2 deletions
diff --git a/proofs/logic.ml b/proofs/logic.ml
index 4eb8658f83..b12d966387 100644
--- a/proofs/logic.ml
+++ b/proofs/logic.ml
@@ -581,10 +581,19 @@ let prim_refiner r sigma goal =
let (sgl,cl',sigma,oterm) = mk_refgoals sigma goal [] cl r in
let sgl = List.rev sgl in
let sigma = Goal.V82.partial_solution env sigma goal (EConstr.of_constr oterm) in
- (sgl, sigma)
+ { Evd.it = sgl; Evd.sigma = sigma; }
-let prim_refiner ~check r sigma goal =
+let refiner ~check r { Evd.sigma = sigma; Evd.it = goal } =
if check then
with_check (prim_refiner r sigma) goal
else
prim_refiner r sigma goal
+
+(* Profiling refiner *)
+let refiner ~check =
+ if Flags.profile then
+ let refiner_key = CProfile.declare_profile "refiner" in
+ CProfile.profile2 refiner_key (refiner ~check)
+ else refiner ~check
+
+let refiner ~check c = Proofview.V82.tactic ~nf_evars:false (refiner ~check c)