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

[wp] -wp-auto fallback in strategies

parent 9e734c16
No related branches found
No related tags found
No related merge requests found
...@@ -42,6 +42,7 @@ type strategy = { ...@@ -42,6 +42,7 @@ type strategy = {
and alternative = and alternative =
| Strategy of string loc | Strategy of string loc
| Provers of string loc list * float option (* timeout *) | Provers of string loc list * float option (* timeout *)
| Auto of string loc list (* deprecated -wp-auto *)
| Tactic of { | Tactic of {
tactic : string loc ; tactic : string loc ;
select : value list ; select : value list ;
...@@ -193,6 +194,9 @@ let parse_alternative ctxt p = ...@@ -193,6 +194,9 @@ let parse_alternative ctxt p =
let tactic = parse_name ctxt ~kind:"tactic" p in let tactic = parse_name ctxt ~kind:"tactic" p in
parse_tactic_params ctxt (Pattern.context ctxt) ~tactic parse_tactic_params ctxt (Pattern.context ctxt) ~tactic
~select:[] ~lookup:[] ~params:[] ~children:[] ~default:None ps ~select:[] ~lookup:[] ~params:[] ~children:[] ~default:None ps
| PLapp("\\auto",[],ps) ->
let strategies = List.map (parse_name ctxt ~kind:"auto") ps in
Auto strategies
| _ -> ctxt.error loc "Strategy definition expected (%a)" debug p | _ -> ctxt.error loc "Strategy definition expected (%a)" debug p
(* -------------------------------------------------------------------------- *) (* -------------------------------------------------------------------------- *)
......
...@@ -1686,6 +1686,7 @@ Strategy consists of list of alternatives with the following syntax: ...@@ -1686,6 +1686,7 @@ Strategy consists of list of alternatives with the following syntax:
\textit{alternative} $::=$ \\ \textit{alternative} $::=$ \\
\quad$|$\quad\verb+\prover+(\verb+"p"+\pdots\verb+"p"+, \textit{timeout}) \\ \quad$|$\quad\verb+\prover+(\verb+"p"+\pdots\verb+"p"+, \textit{timeout}) \\
\quad$|$\quad\verb+\tactic+(\verb+"id"+, \textit{param}\pdots\textit{param}) \\ \quad$|$\quad\verb+\tactic+(\verb+"id"+, \textit{param}\pdots\textit{param}) \\
\quad$|$\quad\verb+\auto+(\verb+"id"+,\pdots\verb+"id"+) \\
\quad$|$\quad\verb+\default+ \\ \quad$|$\quad\verb+\default+ \\
\quad$|$\quad\textit{strategy} \quad$|$\quad\textit{strategy}
\end{tabular} \end{tabular}
...@@ -1702,6 +1703,8 @@ Each form \emph{alternative} consists of one possible solution to discharge a pr ...@@ -1702,6 +1703,8 @@ Each form \emph{alternative} consists of one possible solution to discharge a pr
\item \verb+\tactic(id,prm...)+ will try to apply the specified tactic with the \item \verb+\tactic(id,prm...)+ will try to apply the specified tactic with the
associated parameters. Tactic parameters allows to select the target of the tactic, associated parameters. Tactic parameters allows to select the target of the tactic,
and the strategy to be used on generated sub-goals. and the strategy to be used on generated sub-goals.
\item \verb+\auto(id,...)+ will try to apply the (deprecated) auto-strategies
available in \textsf{WP} versions prior to Cobalt.
\item \textit{name} or \verb$\default$ tries the specified strategy. \item \textit{name} or \verb$\default$ tries the specified strategy.
\end{itemize} \end{itemize}
......
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