This mode replays the automated proofs and the interactive ones, re-running Alt-Ergo on every \textsf{WP} goals and every proof tactic sub-goals. The user scripts are never modified — this is a replay mode only.

This mode replays the automated proofs and the interactive ones, re-running Alt-Ergo on every \textsf{WP} goals and every proof tactic sub-goals. The user scripts are never modified — this is a replay mode only.

\clearpage

\subsection{Strategies}

\subsection{Available Tactics}

Strategies are heuristics that generate a prioritized bunch of tactics to be tried on the current goal.

Few built-in strategies are provided by the \textsf{WP} plug-in ; however, the user can extends the proof editor with

custom ones, as explained in section~\ref{wp-custom-tactics} below.

To run strategies, the interactive proof editor provide a single button \texttt{Strategies} in the tactic panel.

Configure the heuristics you want to include in your try, then click the button. The generated with highest priority is immediately applied. The proof summary now display \texttt{backtrack} buttons revealing proof nodes where alternative tactics are available. You can use those backtracking button to cycle over the generated tactics.

Of course, strategies are meant to be used multiple times, in sequence. Recall that strategies apply highest priority tactic first, on the current goal. When using strategies several times, you shall see several \texttt{backtrack}ing buttons in your proof script. You backtrack from any point at any time.

You shall also alternate strategies \emph{and} manually triggered tactics. Though, strategies are only used to

\emph{infer} or \emph{suggest} interesting tactics to the user. Once your are finished with your proved, only the tactics are saved in the script, not the strategies used to find them. Hence, replaying a script generated with strategies would not involve backtracking any more. The script will directly replay your chosen alternatives.

It is also possible to call strategies from the command line, with option \texttt{-wp-auto}. The strategies are tried up to some depth, and while a limited number of pending goals

remains unproved by \textsf{Qed} or the selected provers. More precisely:

\begin{description}

\item[\tt -wp-auto s,...] applies strategies \texttt{s,...} recursively to unproved goals.

\item[\tt -wp-auto-depth <$n$>] limit recursive application of strategies to depth $n$ (default is 5).

\item[\tt -wp-auto-width <$n$>] limit application of strategies when there is less than $n$ pending goals (default is 10).

\item[\tt -wp-auto-backtrack <$n$>] when the first tried strategies do not close a branch, allows for backtracking

on $n$ alternative strategies. Backtracking is performed on goals which are closed to the root proof obligation, hence

performing a kind of width-first search strategy, which tends to be more efficient in practice.

Backtracking is deactivated by default ($n=0$) and only used when \verb+-wp-auto+ is set.

\end{description}

The name of registered strategies is printed on console by using \texttt{-wp-auto '?'}. Custom strategies can be loaded by plug-ins, see below.

@@ -313,9 +327,6 @@ The tactic is always applicable. It removes hypotheses from the goal on a variab

...

@@ -313,9 +327,6 @@ The tactic is always applicable. It removes hypotheses from the goal on a variab

The tactic also have a variant where only hypotheses \emph{not relevant} to the goal are retained. This is useful to find absurd hypotheses that are completely disjoint from the goal.

The tactic also have a variant where only hypotheses \emph{not relevant} to the goal are retained. This is useful to find absurd hypotheses that are completely disjoint from the goal.

\paragraph{Havoc} Go Through Assigns \\

This is a variant of the \texttt{Lemma} tactic dedicated to \texttt{Havoc} predicate generate by complex assigns clause. The user select an address, and if the address is not assigned by the \texttt{Havoc} clause, the memory at this address is unchanged.

\paragraph{Instance} Instantiate properties\\

\paragraph{Instance} Instantiate properties\\

The user selects a hypothesis with one or several $\forall$ quantifiers, or an $\exists$ quantified goal. Then, with the composer, the use choose to instantiate one or several of the quantified parameters. In case of $\forall$ quantifier over integer, a range of values can be instantiated instead.

The user selects a hypothesis with one or several $\forall$ quantifiers, or an $\exists$ quantified goal. Then, with the composer, the use choose to instantiate one or several of the quantified parameters. In case of $\forall$ quantifier over integer, a range of values can be instantiated instead.

...

@@ -342,9 +353,6 @@ The original equality hypothesis is removed from the goal.

...

@@ -342,9 +353,6 @@ The original equality hypothesis is removed from the goal.

This tactic decompose a \texttt{separated}$(a,n,b,m)$ predicate into its four base cases: $a$ and $b$ have different bases, $a+n \leq b$, $b+m \leq a$, and $a[0..n-1]$ and $b[0..m-1]$ overlaps. The regions are separated in the first three cases, and not separated in the overlapping case. This is kind of normal disjunctive form of the separation clause.

\paragraph{Split} Decompose Logical Connectives and Conditionals\\

\paragraph{Split} Decompose Logical Connectives and Conditionals\\

This is the most versatile available tactic. It decompose merely any logical operator following the sequent calculus rules. Typically:

This is the most versatile available tactic. It decompose merely any logical operator following the sequent calculus rules. Typically:

...

@@ -370,7 +378,8 @@ When the user selects a arbitrary boolean expression $e$, the tactic is similar

...

@@ -370,7 +378,8 @@ When the user selects a arbitrary boolean expression $e$, the tactic is similar

\Delta,\neg e\models G

\Delta,\neg e\models G

\end{array}}\]

\end{array}}\]

Finally, when the user select a arithmetic comparison over $a$ and $b$, the tactics makes a split over $a=b$, $a<b$ and $a>b$:

Finally, when the user select a arithmetic comparison over $a$ and $b$,

the tactics makes a split over $a=b$, $a<b$ and $a>b$:

\[\TACTIC{\Delta\models\,G}{%

\[\TACTIC{\Delta\models\,G}{%

\begin{array}[t]{ll}

\begin{array}[t]{ll}

\Delta,a<b&\models G \\

\Delta,a<b&\models G \\

...

@@ -378,7 +387,7 @@ Finally, when the user select a arithmetic comparison over $a$ and $b$, the tact

...

@@ -378,7 +387,7 @@ Finally, when the user select a arithmetic comparison over $a$ and $b$, the tact

\Delta,a>b&\models G

\Delta,a>b&\models G

\end{array}}\]

\end{array}}\]

\subsubsection{Over integers}

\subsection{Integers \& Bit-wised Tactics}

\paragraph{BitRange} Range of logical bitwise operators \\

\paragraph{BitRange} Range of logical bitwise operators \\

This tactical applies the two following lemmas to the current goal.

This tactical applies the two following lemmas to the current goal.

Strategies are heuristics that generate a prioritized bunch of tactics to be tried on the current goal.

Few built-in strategies are provided by the \textsf{WP} plug-in ; however, the user can extends the proof editor with

custom ones, as explained in section~\ref{wp-custom-tactics} below.

To run strategies, the interactive proof editor provide a single button \texttt{Strategies} in the tactic panel.

Configure the heuristics you want to include in your try, then click the button. The generated with highest priority is immediately applied. The proof summary now display \texttt{backtrack} buttons revealing proof nodes where alternative tactics are available. You can use those backtracking button to cycle over the generated tactics.

Of course, strategies are meant to be used multiple times, in sequence. Recall that strategies apply highest priority tactic first, on the current goal. When using strategies several times, you shall see several \texttt{backtrack}ing buttons in your proof script. You backtrack from any point at any time.

The use select an expression $e\equiv a[k_1\mapsto v][k_2]$. Then:

You shall also alternate strategies \emph{and} manually triggered tactics. Though, strategies are only used to

\[

\emph{infer} or \emph{suggest} interesting tactics to the user. Once your are finished with your proved, only the tactics are saved in the script, not the strategies used to find them. Hence, replaying a script generated with strategies would not involve backtracking any more. The script will directly replay your chosen alternatives.

\TACTIC{\Delta\models\,G}{%

\begin{array}[t]{ll}

\Delta,\,k_1=k_2,\,e = v &\models G \\

\Delta,\,k_1\neq k_2,\,e = a[k_2]&\models G

\end{array}

}\]

It is also possible to call strategies from the command line, with option \texttt{-wp-auto}. The strategies are tried up to some depth, and while a limited number of pending goals

\paragraph{Havoc} Go Through Assigns \\

remains unproved by \textsf{Qed} or the selected provers. More precisely:

This is a variant of the \texttt{Lemma} tactic dedicated to \texttt{Havoc} predicate generate by complex assigns clause. The user select an address, and if the address is not assigned by the \texttt{Havoc} clause, the memory at this address is unchanged.

\begin{description}

\item[\tt -wp-auto s,...] applies strategies \texttt{s,...} recursively to unproved goals.

\item[\tt -wp-auto-depth <$n$>] limit recursive application of strategies to depth $n$ (default is 5).

\item[\tt -wp-auto-width <$n$>] limit application of strategies when there is less than $n$ pending goals (default is 10).

\item[\tt -wp-auto-backtrack <$n$>] when the first tried strategies do not close a branch, allows for backtracking

on $n$ alternative strategies. Backtracking is performed on goals which are closed to the root proof obligation, hence

performing a kind of width-first search strategy, which tends to be more efficient in practice.

Backtracking is deactivated by default ($n=0$) and only used when \verb+-wp-auto+ is set.

\end{description}

The name of registered strategies is printed on console by using \texttt{-wp-auto '?'}. Custom strategies can be loaded by plug-ins, see below.

\paragraph{Separated} Expand Separation Cases\\

This tactic decompose a \texttt{separated}$(a,n,b,m)$ predicate into its four base cases: $a$ and $b$ have different bases, $a+n \leq b$, $b+m \leq a$, and $a[0..n-1]$ and $b[0..m-1]$ overlaps. The regions are separated in the first three cases, and not separated in the overlapping case. This is kind of normal disjunctive form of the separation clause.