\section{Isabelle/HOL}
\label{sec:isabelle}

\index{Isabelle proof assistant}

When using Isabelle from \why, files generated from \why theories and
goals are stored in a dedicated XML format. Those files should not be
edited. Instead, the proofs must be completed in a file with the same
name and extension \texttt{.thy}. This is the file that is opened when
using ``Edit'' action in \texttt{why3 ide}.

\subsection{Installation}

You need version Isabelle2016-1 or Isabelle2017. Former versions are not
supported. We assume below that your version is 2017, please replace
2017 by 2016-1 otherwise.

Isabelle must be installed before compiling \why. After compilation
and installation of \why, you must manually add the path
\begin{verbatim}
<Why3 lib dir>/isabelle
\end{verbatim}
into either the user file
\begin{verbatim}
.isabelle/Isabelle2017/etc/components
\end{verbatim}
or the system-wide file
\begin{verbatim}
<Isabelle install dir>/etc/components
\end{verbatim}

\subsection{Usage}

The most convenient way to call Isabelle for discharging a \why goal
is to start the Isabelle/jedit interface in server mode. In this mode,
one must start the server once, before launching \texttt{why3 ide},
using
\begin{verbatim}
isabelle why3_jedit
\end{verbatim}
Then, inside a \texttt{why3 ide} session, any use of ``Edit'' will
transfer the file to the already opened instance of jEdit. When the
proof is completed, the user must send back the edited proof to
\texttt{why3 ide} by closing the opened buffer, typically by hitting
\texttt{Ctrl-w}.

\subsection{Realizations}

Realizations must be designed in some \texttt{.thy} as follows.
The realization file corresponding to some \why file \texttt{f.why}
should have the following form.
\begin{verbatim}
theory Why3_f
imports Why3_Setup
begin

section {* realization of theory T *}

why3_open "f/T.xml"

why3_vc <some lemma>
<proof>

why3_vc <some other lemma> by proof

[...]

why3_end
\end{verbatim}

See directory \texttt{lib/isabelle} for examples.


%%% Local Variables:
%%% mode: latex
%%% TeX-PDF-mode: t
%%% TeX-master: "manual"
%%% End:
