Commit b9070bdb authored by MARCHE Claude's avatar MARCHE Claude

Doc: proposition for a policy in case of prover upgrade

parent e0d3cca6
\chapter{Compilation, Installation}
In short, installation proceeds as follows.
make install \mbox{\rmfamily (as super-user)}
\section{Installation Instructions from Source Distribution}
After unpacking the distribution, go to the newly created directory
\texttt{why3-\whyversion}. Compilation must start with a
configuration phase which is run as
This analyzes your current configuration and checks if requirements hold.
Compilation requires:
\item The Objective Caml compiler, version \todo{3.10} or higher. It is
available as a binary package for most Unix distributions. For
Debian-based Linux distributions, you can install the packages
ocaml ocaml-native-compilers
It is also installable from sources, downloadable from the site
For some of the \why tools, additional OCaml libraries are needed:
\item For the graphical interface: the Lablgtk2 library for OCaml
bindings of the gtk2 graphical library. For Debian-based Linux
distributions, you can install the packages
liblablgtk2-ocaml-dev liblablgtksourceview2-ocaml-dev
It is also installable from sources, available from the site
\item For \texttt{why3bench}: The OCaml bindings of the sqlite3 library.
For Debian-based Linux distributions, you can install the package
It is also installable from sources, available from the site
When configuration is finished, you can compile \why.
Installation is performed (as super-user if needed) using
make install
Installation can be tested as follows:
\item install some external provers (see~Section\ref{provers} below)
\item run \verb|why3config --detect|
\item run some examples from the distribution, \emph{e.g.} you should
obtain the following:
$ cd examples
$ why3replayer scottish-private-club
Info: found directory 'scottish-private-club' for the project
Opening session... done
Progress: 4/4
Everything OK.
$ why3replayer programs/same_fringe
Info: found directory 'programs/same_fringe' for the project
Opening session... done
Progress: 12/12
Everything OK.
\section{Local use, without installation}
It is not mandatory to install \why into system directories.
\why can be configured and compiled for local use as follows:
./configure --enable-local
The \why executables are then available in the subdirectory
\texttt{bin/}. This directory can be added in your \texttt{PATH}.
\section{Installation of the \why Library}
By default, the \why library is not installed. It can be installed using
make byte opt \\
make install\_lib \mbox{\rmfamily (as super-user)}
\section{Installation of External Provers}
\why can use a wide range of external theorem provers. These need to
be installed separately, and then \why needs to be configured to use
them. There is no need to install these provers before compiling and
installing Why.
For installation of external provers, please refer to the specific
section about provers on the Web page \url{}.
For configuring \why to use the provers, follow instructions given in
\section{Multiple Versions of the Same Prover}
Since version 0.72, \why is able to several versions of the same
prover, e.g. it can use both CVC3 2.2 and CVC3 2.4.1 at the same time.
The automatic detection of provers looks for typical names for their
executable command, e.g. \texttt{cvc3} for CVC3. However, if you
install several version of the same prover it is likely that you would
use specialized executable names, such as \texttt{cvc3-2.2} or
\texttt{cvc3-2.4.1}. To allow the \why detection process to recognize
these, you can use the option \verb|--add-prover| to
\texttt{why3config}, e.g.
why3config --detect --add-prover cvc3-2.4:/usr/local/bin/cvc3-2.4.1
the first argument (here \verb|cvc3-2.4|) must be one of the class of
provers known in the file \verb|provers-detection-data.conf| typically
located in \verb|/usr/local/share/why3| after installation.
\section{Session Update after Prover Upgrade}
If you happen to upgrade a prover, e.g. installing CVC3 2.4.1 in place
of CVC3 2.2, then the proof sessions formerly recorded will still
refer to the old version of the proer. If you open one such a session
with the GUI, and replay the proofs, you will be asked to choose
between 3 options:
\item Keep the former proofs as they are. They will be marked as
\item Upgrade the former proofs to an installed prover (typically a
upgraded version). The corresponding proof attempts will become
attached to this new prover, and marked as obsolete, to make their
replay mandatory.
\item Copy the former proofs to an installed prover. This is a
combination of the actions above: each proof attempt is duplicated,
one with the former prover marked as archived, and one for the new
prover marked as obsolete.
Notice that the prover under consideration is an interactive one, then
the copy option will duplicate also the edited proof scripts, whereas
the upgrade-without-archive option will just reuse the former proof scripts.
Your choice between the three options above will be recorded, one for
each prover, in the \why configuration file. Within the GUI, you can
discard these choices via the \textsf{Preferences} dialog.
Outside the GUI, the prover upgrades are handled as follows. First,
the \texttt{why3replayer} tool will just ignore proof attempts where
the recorded prover does not appear to be installed. Second, the tool
\texttt{why3session} allows you to perform move or copy operations on
proof attempts in a fine-grain way, using filters, as detailed in Section~\ref{sec:why3session}.
\todo{Que faire de ce qui suit ?}
If you just want to update one session with updated provers you can
use \verb|--to-known-prover| instead of the option \verb|--to-prover|.
why3session copy --to-known-prover
For each proof attempt associated to an unknown prover (a prover not in
\verb|.why3.conf|) and not archived, it will try to find a known prover
with the same name. If it finds one, the proof attempt is copied to this
prover and the old proof is set to archived. The corresponding edited
files, if any, are copied and regenerated for the new prover. An archived
proof is not replayed by why3replayer.
%%% Local Variables:
%%% mode: latex
%%% TeX-PDF-mode: t
%%% TeX-master: "manual"
%%% End:
This diff is collapsed.
......@@ -220,16 +220,20 @@ are the following.
% \input{glossary.tex}
% \chapter{Complete API documentation} *)
% \label{chap:apidoc} *)
\chapter{Technical Informations}
\section{Structure of Session Files}
The proof session state is stored in an XML file named
\texttt{\textsl{<dir>}/why3session.xml}, where \texttt{\textsl{<dir>}}
is the directory of the project.
The XML file follows the DTD given in \texttt{share/why3session.dtd} and reproduced below.
\section{The \texttt{why3.conf} configuration file}
\index{why3.conf@\texttt{why3.conf}}\index{configuration file}
[main ]
loadpath = "/usr/local/share/why3/theories"
magic = 2
memlimit = 0
running_provers_max = 2
timelimit = 10
[ide ]
default_editor = "emacs"
task_height = 384
tree_width = 438
verbose = 0
window_height = 779
window_width = 638
[prover coq]
command = "coqc %f"
driver = "/usr/local/share/why3/drivers/coq.drv"
editor = "coqide"
name = "Coq"
version = "8.2pl2"
[prover alt-ergo]
command = "why3-cpulimit %t %m alt-ergo %f"
driver = "/usr/local/share/why3/drivers/alt_ergo.drv"
editor = ""
name = "Alt-Ergo"
version = "0.91"
\caption{Sample why3.conf file}
One can use a custom configuration file. \texttt{why3config}
and other \texttt{why3} tools use priorities for which
user's configuration file to consider:
\item the file specified by the \texttt{-C} or \texttt{-{}-config} options,
\item the file specified by the environment variable
\texttt{WHY3CONFIG} if set.
\item the file \texttt{\$HOME/.why3.conf}
(\texttt{\$USERPROFILE/.why3.conf} under Windows) or, in the case of
local installation, \texttt{why3.conf} in Why3 sources top directory.
If none of these files exists, a built-in default configuration is used.
The configuration file is a human-readable text file, which consists
of association pairs arranged in sections. Figure~\ref{fig:why3conf}
shows an example of configuration file.
A section begins with a header inside square brackets and ends at the
beginning of the next section. The header of a
section can be only one identifier, \texttt{main} and \texttt{ide} in
the example, or it can be composed by a family name and one family
argument, \texttt{prover} is one family name, \texttt{coq} and
\texttt{alt-ergo} are the family argument.
Inside a section, one key can be associated with an integer (\eg{} -555),
a boolean (true, false) or a string (\eg{} "emacs"). One key can appear
only once except if its a multi-value key. The order of apparition of
the keys inside a section matter only for the multi-value key.
\section{Drivers of External Provers}
The drivers of external provers are readable files, in directory
\texttt{drivers}. Experimented users can modify them to change the way
the external provers are called, in particular which transformations
are applied to goals.
Here is a quick documentation of provided transformations. We give
first the non-splitting ones, \eg{} those which produce one goal as
result, and others which produces any number of goals.
Notice that the set of available transformations in your own
installation is given by
why3 --list-transforms
\subsection{Non-splitting transformations}
\item[eliminate\_algebraic] Replaces algebraic data types by first-order
\item[eliminate\_builtin] Suppress definitions of symbols which are
declared as builtin in the driver, i.e. with a ``syntax'' rule.
Replaces all function definitions with axioms.
Replaces all predicate definitions with axioms.
Apply both transformations above.
Replaces mutually recursive definitions with axioms.
Replaces all recursive definitions with axioms.
\item[eliminate\_if\_term] replaces terms of the form \texttt{if
formula then t2 else t3} by lifting them at the level of formulas.
This may introduce \texttt{if then else } in formulas.
\item[eliminate\_if\_fmla] replaces formulas of the form \texttt{if f1 then f2
else f3} by an equivalent formula using implications and other
Apply both transformations above.
\item[eliminate\_inductive] replaces inductive predicates by
(incomplete) axiomatic definitions, i.e. construction axioms and
an inversion axiom.
Eliminates \texttt{let} by substitution, at the predicate level.
Eliminates \texttt{let} by substitution, at the term level.
Apply both transformations above.
% \item[encoding\_decorate\_mono]
% \item[encoding\_enumeration]
Encode polymorphic types into monomorphic type~\cite{conchon08smt}.
Encode theories into unsorted logic. %~\cite{cruanes10}.
% \item[filter\_trigger] *)
% \item[filter\_trigger\_builtin] *)
% \item[filter\_trigger\_no\_predicate] *)
% \item[hypothesis\_selection] *)
% Filter hypothesis of goals~\cite{couchot07ftp,cruanes10}. *)
expands all non-recursive definitions.
\item[inline\_goal] Expands all outermost symbols of the goal that
have a non-recursive definition.
removes definitions of the form
function f x_1 .. x_n = (g e_1 .. e_k)
predicate p x_1 .. x_n = (q e_1 .. e_k)
when each $e_i$ is either a ground term or one of the $x_j$, and
each $x_1$ .. $x_n$ occur at most once in the $e_i$
\item[introduce\_premises] moves antecedents of implications and
universal quantifications of the goal into the premises of the task.
% \item[remove\_triggers] *)
% removes the triggers in all quantifications. *)
\item[simplify\_array] Automatically rewrites the task using the lemma
\verb|Select_eq| of theory \verb|array.Array|.
\item[simplify\_formula] reduces trivial equalities $t=t$ to true and
then simplifies propositional structure: removes true, false, ``f
and f'' to ``f'', etc.
\item[simplify\_recursive\_definition] reduces mutually recursive
definitions if they are not really mutually recursive, e.g.:
function f : ... = .... g ...
with g : .. = e
function g : .. = e
function f : ... = .... g ...
if f does not occur in e
simplifies quantifications of the form
forall x, x=t -> P(x)
forall x, t=x -> P(x)
when x does not occur in t
More generally, it applies this simplification whenever x=t appear
in a negative position.
same as above but applies only in the goal.
splits conjunctive premises.
\subsection{Splitting transformations}
composition of \texttt{split\_premise} and \texttt{full\_split\_goal}.
\item[full\_split\_goal] puts the goal in a conjunctive form,
returns the corresponding set of subgoals. The number of subgoals
generated may be exponential in the size of the initial goal.
\item[simplify\_formula\_and\_task] same as \texttt{simplify\_formula}
but also removes the goal if it is equivalent to true.
composition of \texttt{split\_premise} and \texttt{split\_goal}.
\item[split\_goal] if the goal is a conjunction of goals, returns the
corresponding set of subgoals. The number of subgoals generated is linear in
the size of the initial goal.
when a goal is an implication, moves the antecedents into the premises.
%%% Local Variables:
%%% mode: latex
%%% TeX-PDF-mode: t
%%% TeX-master: "manual"
%%% End:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment