Skip to content
Snippets Groups Projects
Commit 0a289372 authored by Loïc Correnson's avatar Loïc Correnson
Browse files

[wp] fix things

parent 6f53cd43
No related branches found
No related tags found
No related merge requests found
...@@ -141,7 +141,7 @@ let iteri f tree = ...@@ -141,7 +141,7 @@ let iteri f tree =
let rec depth node = let rec depth node =
match node.parent with match node.parent with
| None -> 0 | None -> 0
| Some p -> depth p | Some p -> succ @@ depth p
(* -------------------------------------------------------------------------- *) (* -------------------------------------------------------------------------- *)
(* --- Consolidating --- *) (* --- Consolidating --- *)
......
...@@ -331,19 +331,20 @@ let rec sequence (f : 'a -> solver) = function ...@@ -331,19 +331,20 @@ let rec sequence (f : 'a -> solver) = function
| [] -> unknown | [] -> unknown
| x::xs -> f x +>> sequence f xs | x::xs -> f x +>> sequence f xs
let rec explore_strategy env p s : solver = let rec explore_strategy env process strategy : solver =
sequence sequence
(explore_alternative env p s) (explore_alternative env process strategy)
(ProofStrategy.alternatives s) (ProofStrategy.alternatives strategy)
and explore_alternative env p s a : solver = and explore_alternative env process strategy alternative : solver =
explore_provers env a +>> explore_provers env alternative +>>
explore_tactic env p s a +>> explore_tactic env process strategy alternative +>>
explore_auto env p a +>> explore_auto env process alternative +>>
explore_fallback env p a explore_fallback env process alternative
and explore_provers env a : solver = and explore_provers env alternative : solver =
let provers,timeout = ProofStrategy.provers ~default:env.Env.provers a in let provers,timeout =
ProofStrategy.provers ~default:env.Env.provers alternative in
sequence (explore_prover env timeout) provers sequence (explore_prover env timeout) provers
and explore_prover env timeout prover node = and explore_prover env timeout prover node =
...@@ -354,13 +355,13 @@ and explore_prover env timeout prover node = ...@@ -354,13 +355,13 @@ and explore_prover env timeout prover node =
let config = { VCS.default with timeout = Some timeout } in let config = { VCS.default with timeout = Some timeout } in
Env.prove env wpo ~config prover Env.prove env wpo ~config prover
and explore_tactic env process s a node = and explore_tactic env process strategy alternative node =
match ProofStrategy.tactic env.tree node s a with match ProofStrategy.tactic env.tree node strategy alternative with
| None -> failed | None -> failed
| Some nodes -> List.iter process nodes ; success | Some nodes -> List.iter process nodes ; success
and explore_auto env process a node = and explore_auto env process alternative node =
match ProofStrategy.auto a with match ProofStrategy.auto alternative with
| None -> failed | None -> failed
| Some h -> | Some h ->
match ProverSearch.search env.tree ~anchor:node [h] with match ProverSearch.search env.tree ~anchor:node [h] with
...@@ -369,10 +370,10 @@ and explore_auto env process a node = ...@@ -369,10 +370,10 @@ and explore_auto env process a node =
List.iter (fun (_,node) -> process node) @@ List.iter (fun (_,node) -> process node) @@
snd @@ ProofEngine.commit fork ; success snd @@ ProofEngine.commit fork ; success
and explore_fallback env process a node = and explore_fallback env process alternative node =
match ProofStrategy.fallback a with match ProofStrategy.fallback alternative with
| None -> failed | None -> failed
| Some s -> explore_strategy env process s node | Some strategy -> explore_strategy env process strategy node
let explore_hint env process node = let explore_hint env process node =
if ProofEngine.depth node > env.Env.depth then failed if ProofEngine.depth node > env.Env.depth then failed
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment