doc-src/Sledgehammer/sledgehammer.tex
author Walther Neuper <neuper@ist.tugraz.at>
Thu, 12 Aug 2010 15:03:34 +0200
branchisac-from-Isabelle2009-2
changeset 37913 20e3616b2d9c
parent 36918 90bb12cf8e36
child 37389 d0cea0796295
permissions -rw-r--r--
prepare reactivation of isac-update-Isa09-2
blanchet@36918
     1
\documentclass[a4paper,12pt]{article}
blanchet@36918
     2
\usepackage[T1]{fontenc}
blanchet@36918
     3
\usepackage{amsmath}
blanchet@36918
     4
\usepackage{amssymb}
blanchet@36918
     5
\usepackage[english,french]{babel}
blanchet@36918
     6
\usepackage{color}
blanchet@36918
     7
\usepackage{footmisc}
blanchet@36918
     8
\usepackage{graphicx}
blanchet@36918
     9
%\usepackage{mathpazo}
blanchet@36918
    10
\usepackage{multicol}
blanchet@36918
    11
\usepackage{stmaryrd}
blanchet@36918
    12
%\usepackage[scaled=.85]{beramono}
blanchet@36918
    13
\usepackage{../iman,../pdfsetup}
blanchet@36918
    14
blanchet@36918
    15
%\oddsidemargin=4.6mm
blanchet@36918
    16
%\evensidemargin=4.6mm
blanchet@36918
    17
%\textwidth=150mm
blanchet@36918
    18
%\topmargin=4.6mm
blanchet@36918
    19
%\headheight=0mm
blanchet@36918
    20
%\headsep=0mm
blanchet@36918
    21
%\textheight=234mm
blanchet@36918
    22
blanchet@36918
    23
\def\Colon{\mathord{:\mkern-1.5mu:}}
blanchet@36918
    24
%\def\lbrakk{\mathopen{\lbrack\mkern-3.25mu\lbrack}}
blanchet@36918
    25
%\def\rbrakk{\mathclose{\rbrack\mkern-3.255mu\rbrack}}
blanchet@36918
    26
\def\lparr{\mathopen{(\mkern-4mu\mid}}
blanchet@36918
    27
\def\rparr{\mathclose{\mid\mkern-4mu)}}
blanchet@36918
    28
blanchet@36918
    29
\def\unk{{?}}
blanchet@36918
    30
\def\undef{(\lambda x.\; \unk)}
blanchet@36918
    31
%\def\unr{\textit{others}}
blanchet@36918
    32
\def\unr{\ldots}
blanchet@36918
    33
\def\Abs#1{\hbox{\rm{\flqq}}{\,#1\,}\hbox{\rm{\frqq}}}
blanchet@36918
    34
\def\Q{{\smash{\lower.2ex\hbox{$\scriptstyle?$}}}}
blanchet@36918
    35
blanchet@36918
    36
\urlstyle{tt}
blanchet@36918
    37
blanchet@36918
    38
\begin{document}
blanchet@36918
    39
blanchet@36918
    40
\selectlanguage{english}
blanchet@36918
    41
blanchet@36918
    42
\title{\includegraphics[scale=0.5]{isabelle_sledgehammer} \\[4ex]
blanchet@36918
    43
Hammering Away \\[\smallskipamount]
blanchet@36918
    44
\Large A User's Guide to Sledgehammer for Isabelle/HOL}
blanchet@36918
    45
\author{\hbox{} \\
blanchet@36918
    46
Jasmin Christian Blanchette \\
blanchet@36918
    47
{\normalsize Institut f\"ur Informatik, Technische Universit\"at M\"unchen} \\
blanchet@36918
    48
\hbox{}}
blanchet@36918
    49
blanchet@36918
    50
\maketitle
blanchet@36918
    51
blanchet@36918
    52
\tableofcontents
blanchet@36918
    53
blanchet@36918
    54
\setlength{\parskip}{.7em plus .2em minus .1em}
blanchet@36918
    55
\setlength{\parindent}{0pt}
blanchet@36918
    56
\setlength{\abovedisplayskip}{\parskip}
blanchet@36918
    57
\setlength{\abovedisplayshortskip}{.9\parskip}
blanchet@36918
    58
\setlength{\belowdisplayskip}{\parskip}
blanchet@36918
    59
\setlength{\belowdisplayshortskip}{.9\parskip}
blanchet@36918
    60
blanchet@36918
    61
% General-purpose enum environment with correct spacing
blanchet@36918
    62
\newenvironment{enum}%
blanchet@36918
    63
    {\begin{list}{}{%
blanchet@36918
    64
        \setlength{\topsep}{.1\parskip}%
blanchet@36918
    65
        \setlength{\partopsep}{.1\parskip}%
blanchet@36918
    66
        \setlength{\itemsep}{\parskip}%
blanchet@36918
    67
        \advance\itemsep by-\parsep}}
blanchet@36918
    68
    {\end{list}}
blanchet@36918
    69
blanchet@36918
    70
\def\pre{\begingroup\vskip0pt plus1ex\advance\leftskip by\leftmargin
blanchet@36918
    71
\advance\rightskip by\leftmargin}
blanchet@36918
    72
\def\post{\vskip0pt plus1ex\endgroup}
blanchet@36918
    73
blanchet@36918
    74
\def\prew{\pre\advance\rightskip by-\leftmargin}
blanchet@36918
    75
\def\postw{\post}
blanchet@36918
    76
blanchet@36918
    77
\section{Introduction}
blanchet@36918
    78
\label{introduction}
blanchet@36918
    79
blanchet@36918
    80
Sledgehammer is a tool that applies first-order automatic theorem provers (ATPs)
blanchet@36918
    81
on the current goal. The supported ATPs are E \cite{schulz-2002}, SPASS
blanchet@36918
    82
\cite{weidenbach-et-al-2009}, and Vampire \cite{riazanov-voronkov-2002}, which
blanchet@36918
    83
can be run locally or remotely via the SystemOnTPTP web service
blanchet@36918
    84
\cite{sutcliffe-2000}.
blanchet@36918
    85
blanchet@36918
    86
The problem passed to ATPs consists of the current goal together with a
blanchet@36918
    87
heuristic selection of facts (theorems) from the current theory context,
blanchet@36918
    88
filtered by relevance. The result of a successful ATP proof search is some
blanchet@36918
    89
source text that usually (but not always) reconstructs the proof within
blanchet@36918
    90
Isabelle, without requiring the ATPs again. The reconstructed proof relies on
blanchet@36918
    91
the general-purpose Metis prover \cite{metis}, which is fully integrated into
blanchet@36918
    92
Isabelle/HOL, with explicit inferences going through the kernel. Thus its
blanchet@36918
    93
results are correct by construction.
blanchet@36918
    94
blanchet@36918
    95
\newbox\boxA
blanchet@36918
    96
\setbox\boxA=\hbox{\texttt{nospam}}
blanchet@36918
    97
blanchet@36918
    98
Examples of Sledgehammer use can be found in Isabelle's
blanchet@36918
    99
\texttt{src/HOL/Metis\_Examples} directory.
blanchet@36918
   100
Comments and bug reports concerning Sledgehammer or this manual should be
blanchet@36918
   101
directed to
blanchet@36918
   102
\texttt{blan{\color{white}nospam}\kern-\wd\boxA{}chette@\allowbreak
blanchet@36918
   103
in.\allowbreak tum.\allowbreak de}.
blanchet@36918
   104
blanchet@36918
   105
\vskip2.5\smallskipamount
blanchet@36918
   106
blanchet@36918
   107
%\textbf{Acknowledgment.} The author would like to thank Mark Summerfield for
blanchet@36918
   108
%suggesting several textual improvements.
blanchet@36918
   109
blanchet@36918
   110
\section{Installation}
blanchet@36918
   111
\label{installation}
blanchet@36918
   112
blanchet@36918
   113
Sledgehammer is part of Isabelle, so you don't need to install it. However, it
blanchet@36918
   114
relies on third-party automatic theorem provers (ATPs). Currently, E, SPASS, and
blanchet@36918
   115
Vampire are supported. All of these are available remotely via SystemOnTPTP
blanchet@36918
   116
\cite{sutcliffe-2000}, but if you want better performance you will need to
blanchet@36918
   117
install at least E and SPASS locally.
blanchet@36918
   118
blanchet@36918
   119
There are three main ways to install E and SPASS:
blanchet@36918
   120
blanchet@36918
   121
\begin{enum}
blanchet@36918
   122
\item[$\bullet$] If you installed an official Isabelle package with everything
blanchet@36918
   123
inside, it should already include properly setup executables for E and SPASS,
blanchet@36918
   124
ready to use.
blanchet@36918
   125
blanchet@36918
   126
\item[$\bullet$] Otherwise, you can download the Isabelle-aware E and SPASS
blanchet@36918
   127
binary packages from Isabelle's download page. Extract the archives, then add a
blanchet@36918
   128
line to your \texttt{\char`\~/.isabelle/etc/components} file with the absolute path to
blanchet@36918
   129
E or SPASS. For example, if \texttt{\char`\~/.isabelle/etc/components} does not exist
blanchet@36918
   130
yet and you extracted SPASS to \texttt{/usr/local/spass-3.7}, create
blanchet@36918
   131
the file \texttt{\char`\~/.isabelle/etc/components} with the single line
blanchet@36918
   132
blanchet@36918
   133
\prew
blanchet@36918
   134
\texttt{/usr/local/spass-3.7}
blanchet@36918
   135
\postw
blanchet@36918
   136
blanchet@36918
   137
\item[$\bullet$] If you prefer to build E or SPASS yourself, feel free to do so
blanchet@36918
   138
and set the environment variable \texttt{E\_HOME} or \texttt{SPASS\_HOME} to the
blanchet@36918
   139
directory that contains the \texttt{eproof} or \texttt{SPASS} executable,
blanchet@36918
   140
respectively.
blanchet@36918
   141
\end{enum}
blanchet@36918
   142
blanchet@36918
   143
To check whether E and SPASS are installed, follow the example in
blanchet@36918
   144
\S\ref{first-steps}.
blanchet@36918
   145
blanchet@36918
   146
\section{First Steps}
blanchet@36918
   147
\label{first-steps}
blanchet@36918
   148
blanchet@36918
   149
To illustrate Sledgehammer in context, let us start a theory file and
blanchet@36918
   150
attempt to prove a simple lemma:
blanchet@36918
   151
blanchet@36918
   152
\prew
blanchet@36918
   153
\textbf{theory}~\textit{Scratch} \\
blanchet@36918
   154
\textbf{imports}~\textit{Main} \\
blanchet@36918
   155
\textbf{begin} \\[2\smallskipamount]
blanchet@36918
   156
%
blanchet@36918
   157
\textbf{lemma} ``$[a] = [b] \,\longleftrightarrow\, a = b$'' \\
blanchet@36918
   158
\textbf{sledgehammer}
blanchet@36918
   159
\postw
blanchet@36918
   160
blanchet@36918
   161
After a few seconds, Sledgehammer produces the following output:
blanchet@36918
   162
blanchet@36918
   163
\prew
blanchet@36918
   164
\slshape
blanchet@36918
   165
Sledgehammer: ATP ``\textit{e}'' for subgoal 1: \\
blanchet@36918
   166
$([a] = [b]) = (a = b)$ \\
blanchet@36918
   167
Try this command: \textbf{by} (\textit{metis hd.simps}). \\
blanchet@36918
   168
To minimize the number of lemmas, try this command: \\
blanchet@36918
   169
\textbf{sledgehammer} \textit{minimize} [\textit{atp} = \textit{e}] (\textit{hd.simps}). \\[3\smallskipamount]
blanchet@36918
   170
%
blanchet@36918
   171
Sledgehammer: ATP ``\textit{spass}'' for subgoal 1: \\
blanchet@36918
   172
$([a] = [b]) = (a = b)$ \\
blanchet@36918
   173
Try this command: \textbf{by} (\textit{metis insert\_Nil last\_ConsL}). \\
blanchet@36918
   174
To minimize the number of lemmas, try this command: \\
blanchet@36918
   175
\textbf{sledgehammer} \textit{minimize} [\textit{atp} = \textit{spass}] (\textit{insert\_Nil last\_ConsL}). \\[3\smallskipamount]
blanchet@36918
   176
%
blanchet@36918
   177
Sledgehammer: ATP ``\textit{remote\_vampire}'' for subgoal 1: \\
blanchet@36918
   178
$([a] = [b]) = (a = b)$ \\
blanchet@36918
   179
Try this command: \textbf{by} (\textit{metis One\_nat\_def\_raw empty\_replicate} \\
blanchet@36918
   180
\phantom{Try this command: \textbf{by} (\textit{metis~}}\textit{insert\_Nil last\_ConsL replicate\_Suc}). \\
blanchet@36918
   181
To minimize the number of lemmas, try this command: \\
blanchet@36918
   182
\textbf{sledgehammer} \textit{minimize} [\textit{atp} = \textit{remote\_vampire}] \\
blanchet@36918
   183
\phantom{\textbf{sledgehammer}~}(\textit{One\_nat\_def\_raw empty\_replicate insert\_Nil} \\
blanchet@36918
   184
\phantom{\textbf{sledgehammer}~(}\textit{last\_ConsL replicate\_Suc}).
blanchet@36918
   185
\postw
blanchet@36918
   186
blanchet@36918
   187
Sledgehammer ran E, SPASS, and the remote version of Vampire in parallel. If E
blanchet@36918
   188
and SPASS are not installed (\S\ref{installation}), you will see references to
blanchet@36918
   189
their remote American cousins \textit{remote\_e} and \textit{remote\_spass}
blanchet@36918
   190
instead of \textit{e} and \textit{spass}.
blanchet@36918
   191
blanchet@36918
   192
Based on each ATP proof, Sledgehammer gives a one-liner proof that uses the
blanchet@36918
   193
\textit{metis} method. You can click them and insert them into the theory text.
blanchet@36918
   194
You can click the ``\textbf{sledgehammer} \textit{minimize}'' command if you
blanchet@36918
   195
want to look for a shorter (and faster) proof. But here the proof found by E
blanchet@36918
   196
looks perfect, so click it to finish the proof.
blanchet@36918
   197
blanchet@36918
   198
You can ask Sledgehammer for an Isar text proof by passing the
blanchet@36918
   199
\textit{isar\_proof} option:
blanchet@36918
   200
blanchet@36918
   201
\prew
blanchet@36918
   202
\textbf{sledgehammer} [\textit{isar\_proof}]
blanchet@36918
   203
\postw
blanchet@36918
   204
blanchet@36918
   205
When Isar proof construction is successful, it can yield proofs that are more
blanchet@36918
   206
readable and also faster than the \textit{metis} one-liners. This feature is
blanchet@36918
   207
experimental.
blanchet@36918
   208
blanchet@36918
   209
\section{Command Syntax}
blanchet@36918
   210
\label{command-syntax}
blanchet@36918
   211
blanchet@36918
   212
Sledgehammer can be invoked at any point when there is an open goal by entering
blanchet@36918
   213
the \textbf{sledgehammer} command in the theory file. Its general syntax is as
blanchet@36918
   214
follows:
blanchet@36918
   215
blanchet@36918
   216
\prew
blanchet@36918
   217
\textbf{sledgehammer} \textit{subcommand\/$^?$ options\/$^?$ facts\_override\/$^?$ num\/$^?$}
blanchet@36918
   218
\postw
blanchet@36918
   219
blanchet@36918
   220
For convenience, Sledgehammer is also available in the ``Commands'' submenu of
blanchet@36918
   221
the ``Isabelle'' menu in Proof General or by pressing the Emacs key sequence C-c
blanchet@36918
   222
C-a C-s. This is equivalent to entering the \textbf{sledgehammer} command with
blanchet@36918
   223
no arguments in the theory text.
blanchet@36918
   224
blanchet@36918
   225
In the general syntax, the \textit{subcommand} may be any of the following:
blanchet@36918
   226
blanchet@36918
   227
\begin{enum}
blanchet@36918
   228
\item[$\bullet$] \textbf{\textit{run} (the default):} Runs Sledgehammer on subgoal number
blanchet@36918
   229
\textit{num} (1 by default), with the given options and facts.
blanchet@36918
   230
blanchet@36918
   231
\item[$\bullet$] \textbf{\textit{minimize}:} Attempts to minimize the provided facts
blanchet@36918
   232
(specified in the \textit{facts\_override} argument) to obtain a simpler proof
blanchet@36918
   233
involving fewer facts. The options and goal number are as for \textit{run}.
blanchet@36918
   234
blanchet@36918
   235
\item[$\bullet$] \textbf{\textit{messages}:} Redisplays recent messages issued by
blanchet@36918
   236
Sledgehammer. This allows you to examine results that might have been lost due
blanchet@36918
   237
to Sledgehammer's asynchronous nature. The \textit{num} argument specifies a
blanchet@36918
   238
limit on the number of messages to display (5 by default).
blanchet@36918
   239
blanchet@36918
   240
\item[$\bullet$] \textbf{\textit{available\_atps}:} Prints the list of installed ATPs.
blanchet@36918
   241
See \S\ref{installation} and \S\ref{mode-of-operation} for more information on
blanchet@36918
   242
how to install ATPs.
blanchet@36918
   243
blanchet@36918
   244
\item[$\bullet$] \textbf{\textit{running\_atps}:} Prints information about currently
blanchet@36918
   245
running ATPs, including elapsed runtime and remaining time until timeout.
blanchet@36918
   246
blanchet@36918
   247
\item[$\bullet$] \textbf{\textit{kill\_atps}:} Terminates all running ATPs.
blanchet@36918
   248
blanchet@36918
   249
\item[$\bullet$] \textbf{\textit{refresh\_tptp}:} Refreshes the list of remote
blanchet@36918
   250
ATPs available at System\-On\-TPTP \cite{sutcliffe-2000}.
blanchet@36918
   251
\end{enum}
blanchet@36918
   252
blanchet@36918
   253
Sledgehammer's behavior can be influenced by various \textit{options}, which can
blanchet@36918
   254
be specified in brackets after the \textbf{sledgehammer} command. The
blanchet@36918
   255
\textit{options} are a list of key--value pairs of the form ``[$k_1 = v_1,
blanchet@36918
   256
\ldots, k_n = v_n$]''. For Boolean options, ``= \textit{true}'' is optional. For
blanchet@36918
   257
example:
blanchet@36918
   258
blanchet@36918
   259
\prew
blanchet@36918
   260
\textbf{sledgehammer} [\textit{isar\_proof}, \,\textit{timeout} = 120$\,s$]
blanchet@36918
   261
\postw
blanchet@36918
   262
blanchet@36918
   263
Default values can be set using \textbf{sledgehammer\_\allowbreak params}:
blanchet@36918
   264
blanchet@36918
   265
\prew
blanchet@36918
   266
\textbf{sledgehammer\_params} \textit{options}
blanchet@36918
   267
\postw
blanchet@36918
   268
blanchet@36918
   269
The supported options are described in \S\ref{option-reference}.
blanchet@36918
   270
blanchet@36918
   271
The \textit{facts\_override} argument lets you alter the set of facts that go
blanchet@36918
   272
through the relevance filter. It may be of the form ``(\textit{facts})'', where
blanchet@36918
   273
\textit{facts} is a space-separated list of Isabelle facts (theorems, local
blanchet@36918
   274
assumptions, etc.), in which case the relevance filter is bypassed and the given
blanchet@36918
   275
facts are used. It may also be of the form (\textit{add}:\ \textit{facts}$_1$),
blanchet@36918
   276
(\textit{del}:\ \textit{facts}$_2$), or (\textit{add}:\ \textit{facts}$_1$\
blanchet@36918
   277
\textit{del}:\ \textit{facts}$_2$), where the relevance filter is instructed to
blanchet@36918
   278
proceed as usual except that it should consider \textit{facts}$_1$
blanchet@36918
   279
highly-relevant and \textit{facts}$_2$ fully irrelevant.
blanchet@36918
   280
blanchet@36918
   281
\section{Option Reference}
blanchet@36918
   282
\label{option-reference}
blanchet@36918
   283
blanchet@36918
   284
\def\flushitem#1{\item[]\noindent\kern-\leftmargin \textbf{#1}}
blanchet@36918
   285
\def\qty#1{$\left<\textit{#1}\right>$}
blanchet@36918
   286
\def\qtybf#1{$\mathbf{\left<\textbf{\textit{#1}}\right>}$}
blanchet@36918
   287
\def\optrue#1#2{\flushitem{\textit{#1} $\bigl[$= \qtybf{bool}$\bigr]$\quad [\textit{true}]\hfill (neg.: \textit{#2})}\nopagebreak\\[\parskip]}
blanchet@36918
   288
\def\opfalse#1#2{\flushitem{\textit{#1} $\bigl[$= \qtybf{bool}$\bigr]$\quad [\textit{false}]\hfill (neg.: \textit{#2})}\nopagebreak\\[\parskip]}
blanchet@36918
   289
\def\opsmart#1#2{\flushitem{\textit{#1} $\bigl[$= \qtybf{bool\_or\_smart}$\bigr]$\quad [\textit{smart}]\hfill (neg.: \textit{#2})}\nopagebreak\\[\parskip]}
blanchet@36918
   290
\def\opsmartx#1#2{\flushitem{\textit{#1} $\bigl[$= \qtybf{bool\_or\_smart}$\bigr]$\quad [\textit{smart}]\hfill\\\hbox{}\hfill (neg.: \textit{#2})}\nopagebreak\\[\parskip]}
blanchet@36918
   291
\def\opnodefault#1#2{\flushitem{\textit{#1} = \qtybf{#2}} \nopagebreak\\[\parskip]}
blanchet@36918
   292
\def\opdefault#1#2#3{\flushitem{\textit{#1} = \qtybf{#2}\quad [\textit{#3}]} \nopagebreak\\[\parskip]}
blanchet@36918
   293
\def\oparg#1#2#3{\flushitem{\textit{#1} \qtybf{#2} = \qtybf{#3}} \nopagebreak\\[\parskip]}
blanchet@36918
   294
\def\opargbool#1#2#3{\flushitem{\textit{#1} \qtybf{#2} $\bigl[$= \qtybf{bool}$\bigr]$\hfill (neg.: \textit{#3})}\nopagebreak\\[\parskip]}
blanchet@36918
   295
\def\opargboolorsmart#1#2#3{\flushitem{\textit{#1} \qtybf{#2} $\bigl[$= \qtybf{bool\_or\_smart}$\bigr]$\hfill (neg.: \textit{#3})}\nopagebreak\\[\parskip]}
blanchet@36918
   296
blanchet@36918
   297
Sledgehammer's options are categorized as follows:\ mode of operation
blanchet@36918
   298
(\S\ref{mode-of-operation}), problem encoding (\S\ref{problem-encoding}), output
blanchet@36918
   299
format (\S\ref{output-format}), and timeouts (\S\ref{timeouts}).
blanchet@36918
   300
blanchet@36918
   301
The descriptions below refer to the following syntactic quantities:
blanchet@36918
   302
blanchet@36918
   303
\begin{enum}
blanchet@36918
   304
\item[$\bullet$] \qtybf{string}: A string.
blanchet@36918
   305
\item[$\bullet$] \qtybf{bool\/}: \textit{true} or \textit{false}.
blanchet@36918
   306
\item[$\bullet$] \qtybf{bool\_or\_smart\/}: \textit{true}, \textit{false}, or \textit{smart}.
blanchet@36918
   307
\item[$\bullet$] \qtybf{int\/}: An integer.
blanchet@36918
   308
\item[$\bullet$] \qtybf{time}: An integer followed by $\textit{min}$ (minutes), $s$ (seconds), or \textit{ms}
blanchet@36918
   309
(milliseconds), or the keyword \textit{none} ($\infty$ years).
blanchet@36918
   310
\end{enum}
blanchet@36918
   311
blanchet@36918
   312
Default values are indicated in square brackets. Boolean options have a negated
blanchet@36918
   313
counterpart (e.g., \textit{debug} vs.\ \textit{no\_debug}). When setting
blanchet@36918
   314
Boolean options, ``= \textit{true}'' may be omitted.
blanchet@36918
   315
blanchet@36918
   316
\subsection{Mode of Operation}
blanchet@36918
   317
\label{mode-of-operation}
blanchet@36918
   318
blanchet@36918
   319
\begin{enum}
blanchet@36918
   320
%\optrue{blocking}{non\_blocking}
blanchet@36918
   321
%Specifies whether the \textbf{sledgehammer} command should operate synchronously.
blanchet@36918
   322
%The asynchronous (non-blocking) mode lets the user start proving the putative
blanchet@36918
   323
%theorem while Sledgehammer looks for a counterexample, but it can also be more
blanchet@36918
   324
%confusing. For technical reasons, automatic runs currently always block.
blanchet@36918
   325
blanchet@36918
   326
\opnodefault{atps}{string}
blanchet@36918
   327
Specifies the ATPs (automated theorem provers) to use as a space-separated list
blanchet@36918
   328
(e.g., ``\textit{e}~\textit{spass}''). The following ATPs are supported:
blanchet@36918
   329
blanchet@36918
   330
\begin{enum}
blanchet@36918
   331
\item[$\bullet$] \textbf{\textit{e}:} E is an ATP developed by Stephan Schulz
blanchet@36918
   332
\cite{schulz-2002}. To use E, set the environment variable
blanchet@36918
   333
\texttt{E\_HOME} to the directory that contains the \texttt{eproof} executable,
blanchet@36918
   334
or install the prebuilt E package from Isabelle's download page. See
blanchet@36918
   335
\S\ref{installation} for details.
blanchet@36918
   336
blanchet@36918
   337
\item[$\bullet$] \textbf{\textit{spass}:} SPASS is an ATP developed by Christoph
blanchet@36918
   338
Weidenbach et al.\ \cite{weidenbach-et-al-2009}. To use SPASS, set the
blanchet@36918
   339
environment variable \texttt{SPASS\_HOME} to the directory that contains the
blanchet@36918
   340
\texttt{SPASS} executable, or install the prebuilt SPASS package from Isabelle's
blanchet@36918
   341
download page. See \S\ref{installation} for details.
blanchet@36918
   342
blanchet@36918
   343
\item[$\bullet$] \textbf{\textit{spass\_tptp}:} Same as the above, except that
blanchet@36918
   344
Sledgehammer communicates with SPASS using the TPTP syntax rather than the
blanchet@36918
   345
native DFG syntax. This ATP is provided for experimental purposes.
blanchet@36918
   346
blanchet@36918
   347
\item[$\bullet$] \textbf{\textit{vampire}:} Vampire is an ATP developed by
blanchet@36918
   348
Andrei Voronkov and his colleagues \cite{riazanov-voronkov-2002}. To use
blanchet@36918
   349
Vampire, set the environment variable \texttt{VAMPIRE\_HOME} to the directory
blanchet@36918
   350
that contains the \texttt{vampire} executable.
blanchet@36918
   351
blanchet@36918
   352
\item[$\bullet$] \textbf{\textit{remote\_e}:} The remote version of E executes
blanchet@36918
   353
on Geoff Sutcliffe's Miami servers \cite{sutcliffe-2000}.
blanchet@36918
   354
blanchet@36918
   355
\item[$\bullet$] \textbf{\textit{remote\_spass}:} The remote version of SPASS
blanchet@36918
   356
executes on Geoff Sutcliffe's Miami servers.
blanchet@36918
   357
blanchet@36918
   358
\item[$\bullet$] \textbf{\textit{remote\_vampire}:} The remote version of
blanchet@36918
   359
Vampire executes on Geoff Sutcliffe's Miami servers. Version 9 is used.
blanchet@36918
   360
blanchet@36918
   361
\end{enum}
blanchet@36918
   362
blanchet@36918
   363
By default, Sledgehammer will run E, SPASS, and Vampire in parallel. For E and
blanchet@36918
   364
SPASS, it will use any locally installed version if available, falling back
blanchet@36918
   365
on the remote versions if necessary. For historical reasons, the default value
blanchet@36918
   366
of this option can be overridden using the option ``Sledgehammer: ATPs'' from
blanchet@36918
   367
the ``Isabelle'' menu in Proof General.
blanchet@36918
   368
blanchet@36918
   369
It is a good idea to run several ATPs in parallel, although it could slow down
blanchet@36918
   370
your machine. Tobias Nipkow observed that running E, SPASS, and Vampire together
blanchet@36918
   371
for 5 seconds yields the same success rate as running the most effective of
blanchet@36918
   372
these (Vampire) for 120 seconds \cite{boehme-nipkow-2010}.
blanchet@36918
   373
blanchet@36918
   374
\opnodefault{atp}{string}
blanchet@36918
   375
Alias for \textit{atps}.
blanchet@36918
   376
blanchet@36918
   377
\opfalse{overlord}{no\_overlord}
blanchet@36918
   378
Specifies whether Sledgehammer should put its temporary files in
blanchet@36918
   379
\texttt{\$ISA\-BELLE\_\allowbreak HOME\_\allowbreak USER}, which is useful for
blanchet@36918
   380
debugging Sledgehammer but also unsafe if several instances of the tool are run
blanchet@36918
   381
simultaneously. The files are identified by the prefix \texttt{prob\_}; you may
blanchet@36918
   382
safely remove them after Sledgehammer has run.
blanchet@36918
   383
blanchet@36918
   384
\nopagebreak
blanchet@36918
   385
{\small See also \textit{debug} (\S\ref{output-format}).}
blanchet@36918
   386
\end{enum}
blanchet@36918
   387
blanchet@36918
   388
\subsection{Problem Encoding}
blanchet@36918
   389
\label{problem-encoding}
blanchet@36918
   390
blanchet@36918
   391
\begin{enum}
blanchet@36918
   392
\opfalse{explicit\_apply}{implicit\_apply}
blanchet@36918
   393
Specifies whether function application should be encoded as an explicit
blanchet@36918
   394
``apply'' operator. If the option is set to \textit{false}, each function will
blanchet@36918
   395
be directly applied to as many arguments as possible. Enabling this option can
blanchet@36918
   396
sometimes help discover higher-order proofs that otherwise would not be found.
blanchet@36918
   397
blanchet@36918
   398
\opfalse{full\_types}{partial\_types}
blanchet@36918
   399
Specifies whether full-type information is exported. Enabling this option can
blanchet@36918
   400
prevent the discovery of type-incorrect proofs, but it also tends to slow down
blanchet@36918
   401
the ATPs significantly. For historical reasons, the default value of this option
blanchet@36918
   402
can be overridden using the option ``Sledgehammer: ATPs'' from the ``Isabelle''
blanchet@36918
   403
menu in Proof General.
blanchet@36918
   404
blanchet@36918
   405
\opdefault{relevance\_threshold}{int}{50}
blanchet@36918
   406
Specifies the threshold above which facts are considered relevant by the
blanchet@36918
   407
relevance filter. The option ranges from 0 to 100, where 0 means that all
blanchet@36918
   408
theorems are relevant.
blanchet@36918
   409
blanchet@36918
   410
\opdefault{relevance\_convergence}{int}{320}
blanchet@36918
   411
Specifies the convergence quotient, multiplied by 100, used by the relevance
blanchet@36918
   412
filter. This quotient is used by the relevance filter to scale down the
blanchet@36918
   413
relevance of facts at each iteration of the filter.
blanchet@36918
   414
blanchet@36918
   415
\opsmartx{theory\_relevant}{theory\_irrelevant}
blanchet@36918
   416
Specifies whether the theory from which a fact comes should be taken into
blanchet@36918
   417
consideration by the relevance filter. If the option is set to \textit{smart},
blanchet@36918
   418
it is taken to be \textit{true} for SPASS and \textit{false} for E and Vampire,
blanchet@36918
   419
because empirical results suggest that these are the best settings.
blanchet@36918
   420
blanchet@36918
   421
\opfalse{defs\_relevant}{defs\_irrelevant}
blanchet@36918
   422
Specifies whether the definition of constants occurring in the formula to prove
blanchet@36918
   423
should be considered particularly relevant. Enabling this option tends to lead
blanchet@36918
   424
to larger problems and typically slows down the ATPs.
blanchet@36918
   425
blanchet@36918
   426
\optrue{respect\_no\_atp}{ignore\_no\_atp}
blanchet@36918
   427
Specifies whether Sledgehammer should honor the \textit{no\_atp} attributes. The
blanchet@36918
   428
\textit{no\_atp} attributes marks theorems that tend to confuse ATPs, typically
blanchet@36918
   429
because they can lead to unsound ATP proofs \cite{boehme-nipkow-2010}. It is
blanchet@36918
   430
normally a good idea to leave this option enabled, unless you are debugging
blanchet@36918
   431
Sledgehammer.
blanchet@36918
   432
blanchet@36918
   433
\end{enum}
blanchet@36918
   434
blanchet@36918
   435
\subsection{Output Format}
blanchet@36918
   436
\label{output-format}
blanchet@36918
   437
blanchet@36918
   438
\begin{enum}
blanchet@36918
   439
blanchet@36918
   440
\opfalse{verbose}{quiet}
blanchet@36918
   441
Specifies whether the \textbf{sledgehammer} command should explain what it does.
blanchet@36918
   442
blanchet@36918
   443
\opfalse{debug}{no\_debug}
blanchet@36918
   444
Specifies whether Nitpick should display additional debugging information beyond
blanchet@36918
   445
what \textit{verbose} already displays. Enabling \textit{debug} also enables
blanchet@36918
   446
\textit{verbose} behind the scenes.
blanchet@36918
   447
blanchet@36918
   448
\nopagebreak
blanchet@36918
   449
{\small See also \textit{overlord} (\S\ref{mode-of-operation}).}
blanchet@36918
   450
blanchet@36918
   451
\opfalse{isar\_proof}{no\_isar\_proof}
blanchet@36918
   452
Specifies whether Isar proofs should be output in addition to one-liner
blanchet@36918
   453
\textit{metis} proofs. Isar proof construction is still experimental and often
blanchet@36918
   454
fails; however, they are usually faster and sometimes more robust than
blanchet@36918
   455
\textit{metis} proofs.
blanchet@36918
   456
blanchet@36918
   457
\opdefault{isar\_shrink\_factor}{int}{1}
blanchet@36918
   458
Specifies the granularity of the Isar proof. A value of $n$ indicates that each
blanchet@36918
   459
Isar proof step should correspond to a group of up to $n$ consecutive proof
blanchet@36918
   460
steps in the ATP proof.
blanchet@36918
   461
blanchet@36918
   462
\end{enum}
blanchet@36918
   463
blanchet@36918
   464
\subsection{Timeouts}
blanchet@36918
   465
\label{timeouts}
blanchet@36918
   466
blanchet@36918
   467
\begin{enum}
blanchet@36918
   468
\opdefault{timeout}{time}{$\mathbf{60}$ s}
blanchet@36918
   469
Specifies the maximum amount of time that the ATPs should spend looking for a
blanchet@36918
   470
proof. For historical reasons, the default value of this option can be
blanchet@36918
   471
overridden using the option ``Sledgehammer: Time Limit'' from the ``Isabelle''
blanchet@36918
   472
menu in Proof General.
blanchet@36918
   473
blanchet@36918
   474
\opdefault{minimize\_timeout}{time}{$\mathbf{5}$\,s}
blanchet@36918
   475
Specifies the maximum amount of time that the ATPs should spend looking for a
blanchet@36918
   476
proof for \textbf{sledgehammer}~\textit{minimize}.
blanchet@36918
   477
\end{enum}
blanchet@36918
   478
blanchet@36918
   479
\let\em=\sl
blanchet@36918
   480
\bibliography{../manual}{}
blanchet@36918
   481
\bibliographystyle{abbrv}
blanchet@36918
   482
blanchet@36918
   483
\end{document}