\chapter{Installation}
\label{chap:installation}

This Chapter provides step-by-step installation instructions for \satabs.
\satabs itsself is a command line tool, but a graphical user interface
is also available. The \satabs verification system is modular and
can be used with different model checking tools. Currently, 
\satabs supports the model checkers Cadence SMV, NuSMV, CMU SMV,
SPIN, and BOPPO.

The license for \satabs is provided in Chapter~\ref{chap:license}.

Note that the Windows and Linux x86 binaries are also contained in the
Eclipse plugin for \satabs. Therefore, if you intend to run \satabs
exclusively within Eclipse, you can skip the installation of the command
line tools. However, you still have to install a model checking tool as
described below.

\section{Installing the command line tools}

\begin{enumerate}
\item Download \satabs.
The binaries are available from:

\url{http://www.inf.ethz.ch/personal/daniekro/satabs/}

The Windows and Linux x86 binaries are also contained in the Eclipse 
plugin for \satabs. Therefore, if you intend to run \satabs
exclusively within Eclipse, you can skip the extraction of
the binaries from the archive. You still have to install a 
model checking tool as described below.

\item Unzip/untar the archive in a directory of your choice. 
We recommend to add this directory to your \texttt{PATH}.
The Windows version of \satabs requires the preprocessor 
\texttt{cl.exe}, which is part of Visual Studio. The path
to \texttt{cl.exe} must be part of the \texttt{PATH}
environment variable of your system. If you want to use
\satabs, you have to agree to the license that is distributed
with the binary (have a look at the file \texttt{LICENSE}).

\item You need to install a Model Checker in order to be able
to run \satabs. You can choose between following alternatives:
\begin{enumerate}
  \item Cadence SMV. Available from

    \url{http://embedded.eecs.berkeley.edu/Alumni/kenmcmil/smv/}

    Cadence SMV is a commercial model checker. The free version
    that is available on the homepage above must not be used for
    commercial purposes (read the license agreement thoroughly
    before you download the tool).
    The documentation for SMV can be found in the directory where 
    you unzip/untar SMV under \texttt{./smv/doc/smv/}. We recommend
    to add the \texttt{smv} binary (located in \texttt{./smv/bin/} 
    relative to the path where you unpacked it) to your \texttt{PATH}.
    \satabs uses Cadence SMV by default.

  \item NuSMV. Available from 

    \url{http://nusmv.irst.itc.it/}

    NuSMV is the open source alternative to SMV. Installation
    instructions and documentation can be found on the NuSMV hompeage.
    We recommend to use NuSMV on platforms where SMV is not available 
    (e.g., MAC OS X).
    Again, the NuSMV binary should be added to your \texttt{PATH}.
    Use the option \texttt{--modelchecker nusmv} to instruct
    \satabs to use NuSMV.

  \item CMU SMV. Available from 

    \url{http://www.cs.cmu.edu/~modelcheck/smv.html}

    Note that CMU SMV has not been updated for a long time.
    If you decide to use CMU SMV, the binary should be added to 
    your \texttt{PATH}.

  \item BOPPO. Available from 

    \url{http://www.inf.ethz.ch/personal/daniekro/boppo/}

    BOPPO is a model checker that uses SAT-solving algorithms.
    BOPPO relies on a built-in SAT solver and Quantor, a solver
    for quantified boolean formulas that is currently bundled
    with BOPPO, but also available separately from

    \url{http://fmv.jku.at/quantor/}

    We recommend to add both tools to your \texttt{PATH}.
    By default, \satabs uses the Cadence SMV model checker.
    Use the option \texttt{--modelchecker boppo} when you call
    \satabs and want it to use BOPPO instead of SMV.

  \item SPIN. Available from
    
    \url{http://spinroot.com/spin/whatispin.html}

    SPIN is an explicit state model checker. Since predicate
    abstraction generates abstract programs with many uninitialized
    variables, explicit state model checking algorithms do not
    scale very well for this purpose. We recommend to use
    one of the symbolic model checking tools mentioned above.

\end{enumerate}
\item Now you can execute \satabs. Try running \texttt{satabs}
  on the small examples presented in the tutorial 
  (Section~\ref{sec:tutorial}). If you use the SMV model checker,
  the only parameters you have to specify are the names of the
  files that contain your program.
\end{enumerate}

\section{Installing the Eclipse plugin}

As mentioned above, we provide a user interface which is realized
as a plugin to the Eclipse (available at \url{http://www.eclipse.org}) 
framework. We do not provide installation instructions for Eclipse
(basically, you only have to download the current version and 
extract the files to your harddisk) and assume that you have already
installed the current version (3.x).

To install the Eclipse \satabs plugin, perform following steps:

\begin{enumerate}
  \item In Eclipse, open the menu \emph{Help}$\rightarrow$
    \emph{Software Updates}$\rightarrow$\emph{Find and Install}.
  \item Select the radio button ``Search for new features to install''.
  \item In the window that pops up, select ``New remote site'' and 
    enter the URL 
    \url{http://www.inf.ethz.ch/personal/daniekro/satabs/plugin/}
    into the URL field. Provide a name for the \satabs update site,
    e.g., \satabs plugin (see Figure~\ref{fig:eclipse_install}).
    
    \begin{figure}[h]
      \begin{maxipage}
	\begin{center}
	  \resizebox{0.5\textwidth}{!}{\includegraphics{eclipse_install}}
	\end{center}
      \end{maxipage}
      \caption{Installing the Eclipse plugin for \satabs
	\label{fig:eclipse_install}}
    \end{figure}
    
  \item Select the feature \texttt{org.feature.CmbcSatabs\_}\emph{version},
    read the license thoroughly before you agree (see also
    Chapter~\ref{chap:license}), and install the plugin.
    The plugin will be downloaded automatically. It contains the 
    Windows and Linux executables for \satabs.
    Note that we do not provide the SMV executable!

  \item Unless you have already added the model checker of your choice 
    (e.g., SMV) to your \texttt{PATH}, you should do so \emph{now}.
    In the Eclipse window, select the menu point 
    \emph{Windows}$\rightarrow$\emph{Preferences}, choose the
    \texttt{CMBC and SATABS} preferences and add the corresponding
    \texttt{PATH} environment variable.
    
\end{enumerate}

