author | blanchet |
Fri, 27 May 2011 10:30:07 +0200 | |
changeset 42995 | e23f61546cf0 |
parent 42964 | bf45fd2488a2 |
child 42996 | 29be053ec75b |
permissions | -rw-r--r-- |
36926 | 1 |
\documentclass[a4paper,12pt]{article} |
2 |
\usepackage[T1]{fontenc} |
|
3 |
\usepackage{amsmath} |
|
4 |
\usepackage{amssymb} |
|
5 |
\usepackage[english,french]{babel} |
|
6 |
\usepackage{color} |
|
7 |
\usepackage{footmisc} |
|
8 |
\usepackage{graphicx} |
|
9 |
%\usepackage{mathpazo} |
|
10 |
\usepackage{multicol} |
|
11 |
\usepackage{stmaryrd} |
|
12 |
%\usepackage[scaled=.85]{beramono} |
|
42511 | 13 |
\usepackage{../../lib/texinputs/isabelle,../iman,../pdfsetup} |
36926 | 14 |
|
15 |
%\oddsidemargin=4.6mm |
|
16 |
%\evensidemargin=4.6mm |
|
17 |
%\textwidth=150mm |
|
18 |
%\topmargin=4.6mm |
|
19 |
%\headheight=0mm |
|
20 |
%\headsep=0mm |
|
21 |
%\textheight=234mm |
|
22 |
||
23 |
\def\Colon{\mathord{:\mkern-1.5mu:}} |
|
24 |
%\def\lbrakk{\mathopen{\lbrack\mkern-3.25mu\lbrack}} |
|
25 |
%\def\rbrakk{\mathclose{\rbrack\mkern-3.255mu\rbrack}} |
|
26 |
\def\lparr{\mathopen{(\mkern-4mu\mid}} |
|
27 |
\def\rparr{\mathclose{\mid\mkern-4mu)}} |
|
28 |
||
29 |
\def\unk{{?}} |
|
30 |
\def\undef{(\lambda x.\; \unk)} |
|
31 |
%\def\unr{\textit{others}} |
|
32 |
\def\unr{\ldots} |
|
33 |
\def\Abs#1{\hbox{\rm{\flqq}}{\,#1\,}\hbox{\rm{\frqq}}} |
|
34 |
\def\Q{{\smash{\lower.2ex\hbox{$\scriptstyle?$}}}} |
|
35 |
||
36 |
\urlstyle{tt} |
|
37 |
||
38 |
\begin{document} |
|
39 |
||
40 |
\selectlanguage{english} |
|
41 |
||
42 |
\title{\includegraphics[scale=0.5]{isabelle_sledgehammer} \\[4ex] |
|
43 |
Hammering Away \\[\smallskipamount] |
|
44 |
\Large A User's Guide to Sledgehammer for Isabelle/HOL} |
|
45 |
\author{\hbox{} \\ |
|
46 |
Jasmin Christian Blanchette \\ |
|
47 |
{\normalsize Institut f\"ur Informatik, Technische Universit\"at M\"unchen} \\ |
|
48 |
\hbox{}} |
|
49 |
||
50 |
\maketitle |
|
51 |
||
52 |
\tableofcontents |
|
53 |
||
54 |
\setlength{\parskip}{.7em plus .2em minus .1em} |
|
55 |
\setlength{\parindent}{0pt} |
|
56 |
\setlength{\abovedisplayskip}{\parskip} |
|
57 |
\setlength{\abovedisplayshortskip}{.9\parskip} |
|
58 |
\setlength{\belowdisplayskip}{\parskip} |
|
59 |
\setlength{\belowdisplayshortskip}{.9\parskip} |
|
60 |
||
61 |
% General-purpose enum environment with correct spacing |
|
62 |
\newenvironment{enum}% |
|
63 |
{\begin{list}{}{% |
|
64 |
\setlength{\topsep}{.1\parskip}% |
|
65 |
\setlength{\partopsep}{.1\parskip}% |
|
66 |
\setlength{\itemsep}{\parskip}% |
|
67 |
\advance\itemsep by-\parsep}} |
|
68 |
{\end{list}} |
|
69 |
||
70 |
\def\pre{\begingroup\vskip0pt plus1ex\advance\leftskip by\leftmargin |
|
71 |
\advance\rightskip by\leftmargin} |
|
72 |
\def\post{\vskip0pt plus1ex\endgroup} |
|
73 |
||
74 |
\def\prew{\pre\advance\rightskip by-\leftmargin} |
|
75 |
\def\postw{\post} |
|
76 |
||
77 |
\section{Introduction} |
|
78 |
\label{introduction} |
|
79 |
||
42964
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
80 |
Sledgehammer is a tool that applies automatic theorem provers (ATPs) |
40942 | 81 |
and satisfiability-modulo-theories (SMT) solvers on the current goal. The |
42964
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
82 |
supported ATPs are E \cite{schulz-2002}, LEO-II \cite{leo2}, Satallax |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
83 |
\cite{satallax}, SInE-E \cite{sine}, SNARK \cite{snark}, SPASS |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
84 |
\cite{weidenbach-et-al-2009}, ToFoF-E \cite{tofof}, Vampire |
42945 | 85 |
\cite{riazanov-voronkov-2002}, and Waldmeister \cite{waldmeister}. The ATPs are |
86 |
run either locally or remotely via the System\-On\-TPTP web service |
|
42940 | 87 |
\cite{sutcliffe-2000}. In addition to the ATPs, the SMT solvers Z3 \cite{z3} is |
42945 | 88 |
used by default, and you can tell Sledgehammer to try CVC3 \cite{cvc3} and Yices |
89 |
\cite{yices} as well; these are run either locally or on a server at the TU |
|
90 |
M\"unchen. |
|
36926 | 91 |
|
40073 | 92 |
The problem passed to the automatic provers consists of your current goal |
93 |
together with a heuristic selection of hundreds of facts (theorems) from the |
|
94 |
current theory context, filtered by relevance. Because jobs are run in the |
|
95 |
background, you can continue to work on your proof by other means. Provers can |
|
96 |
be run in parallel. Any reply (which may arrive half a minute later) will appear |
|
97 |
in the Proof General response buffer. |
|
37517
19ba7ec5f1e3
steal some of http://isabelle.in.tum.de/sledgehammer.html and add it to the docs
blanchet
parents:
37498
diff
changeset
|
98 |
|
40073 | 99 |
The result of a successful proof search is some source text that usually (but |
100 |
not always) reconstructs the proof within Isabelle. For ATPs, the reconstructed |
|
101 |
proof relies on the general-purpose Metis prover \cite{metis}, which is fully |
|
102 |
integrated into Isabelle/HOL, with explicit inferences going through the kernel. |
|
103 |
Thus its results are correct by construction. |
|
36926 | 104 |
|
39320 | 105 |
In this manual, we will explicitly invoke the \textbf{sledgehammer} command. |
106 |
Sledgehammer also provides an automatic mode that can be enabled via the |
|
107 |
``Auto Sledgehammer'' option from the ``Isabelle'' menu in Proof General. In |
|
108 |
this mode, Sledgehammer is run on every newly entered theorem. The time limit |
|
109 |
for Auto Sledgehammer and other automatic tools can be set using the ``Auto |
|
110 |
Tools Time Limit'' option. |
|
111 |
||
36926 | 112 |
\newbox\boxA |
113 |
\setbox\boxA=\hbox{\texttt{nospam}} |
|
114 |
||
42763 | 115 |
\newcommand\authoremail{\texttt{blan{\color{white}nospam}\kern-\wd\boxA{}chette@\allowbreak |
116 |
in.\allowbreak tum.\allowbreak de}} |
|
117 |
||
40689 | 118 |
To run Sledgehammer, you must make sure that the theory \textit{Sledgehammer} is |
119 |
imported---this is rarely a problem in practice since it is part of |
|
120 |
\textit{Main}. Examples of Sledgehammer use can be found in Isabelle's |
|
36926 | 121 |
\texttt{src/HOL/Metis\_Examples} directory. |
122 |
Comments and bug reports concerning Sledgehammer or this manual should be |
|
42883 | 123 |
directed to the author at \authoremail. |
36926 | 124 |
|
125 |
\vskip2.5\smallskipamount |
|
126 |
||
127 |
%\textbf{Acknowledgment.} The author would like to thank Mark Summerfield for |
|
128 |
%suggesting several textual improvements. |
|
129 |
||
130 |
\section{Installation} |
|
131 |
\label{installation} |
|
132 |
||
133 |
Sledgehammer is part of Isabelle, so you don't need to install it. However, it |
|
42763 | 134 |
relies on third-party automatic theorem provers (ATPs) and SMT solvers. |
135 |
||
136 |
\subsection{Installing ATPs} |
|
137 |
||
40073 | 138 |
Currently, E, SPASS, and Vampire can be run locally; in addition, E, Vampire, |
42964
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
139 |
LEO-II, Satallax, SInE-E, SNARK, ToFoF-E, and Waldmeister are available remotely |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
140 |
via System\-On\-TPTP \cite{sutcliffe-2000}. If you want better performance, you |
42940 | 141 |
should at least install E and SPASS locally. |
36926 | 142 |
|
38043 | 143 |
There are three main ways to install ATPs on your machine: |
36926 | 144 |
|
145 |
\begin{enum} |
|
146 |
\item[$\bullet$] If you installed an official Isabelle package with everything |
|
147 |
inside, it should already include properly setup executables for E and SPASS, |
|
38043 | 148 |
ready to use.% |
149 |
\footnote{Vampire's license prevents us from doing the same for this otherwise |
|
150 |
wonderful tool.} |
|
36926 | 151 |
|
38043 | 152 |
\item[$\bullet$] Alternatively, you can download the Isabelle-aware E and SPASS |
36926 | 153 |
binary packages from Isabelle's download page. Extract the archives, then add a |
41747
f58d4d202924
fix path to etc/settings and etc/components in doc
blanchet
parents:
41740
diff
changeset
|
154 |
line to your \texttt{\$ISABELLE\_HOME\_USER/etc/components}% |
f58d4d202924
fix path to etc/settings and etc/components in doc
blanchet
parents:
41740
diff
changeset
|
155 |
\footnote{The variable \texttt{\$ISABELLE\_HOME\_USER} is set by Isabelle at |
f58d4d202924
fix path to etc/settings and etc/components in doc
blanchet
parents:
41740
diff
changeset
|
156 |
startup. Its value can be retrieved by invoking \texttt{isabelle} |
f58d4d202924
fix path to etc/settings and etc/components in doc
blanchet
parents:
41740
diff
changeset
|
157 |
\texttt{getenv} \texttt{ISABELLE\_HOME\_USER} on the command line.} |
f58d4d202924
fix path to etc/settings and etc/components in doc
blanchet
parents:
41740
diff
changeset
|
158 |
file with the absolute |
40203 | 159 |
path to E or SPASS. For example, if the \texttt{components} does not exist yet |
160 |
and you extracted SPASS to \texttt{/usr/local/spass-3.7}, create the |
|
161 |
\texttt{components} file with the single line |
|
36926 | 162 |
|
163 |
\prew |
|
164 |
\texttt{/usr/local/spass-3.7} |
|
165 |
\postw |
|
166 |
||
38043 | 167 |
in it. |
168 |
||
169 |
\item[$\bullet$] If you prefer to build E or SPASS yourself, or obtained a |
|
170 |
Vampire executable from somewhere (e.g., \url{http://www.vprover.org/}), |
|
171 |
set the environment variable \texttt{E\_HOME}, \texttt{SPASS\_HOME}, or |
|
172 |
\texttt{VAMPIRE\_HOME} to the directory that contains the \texttt{eproof}, |
|
38063 | 173 |
\texttt{SPASS}, or \texttt{vampire} executable. Sledgehammer has been tested |
42845
94c69e441440
mention version 0.6 of Vampire, since that's what's currently available for download
blanchet
parents:
42763
diff
changeset
|
174 |
with E 1.0 and 1.2, SPASS 3.5 and 3.7, and Vampire 0.6 and 1.0% |
38063 | 175 |
\footnote{Following the rewrite of Vampire, the counter for version numbers was |
42845
94c69e441440
mention version 0.6 of Vampire, since that's what's currently available for download
blanchet
parents:
42763
diff
changeset
|
176 |
reset to 0; hence the (new) Vampire versions 0.6 and 1.0 are more recent than, |
94c69e441440
mention version 0.6 of Vampire, since that's what's currently available for download
blanchet
parents:
42763
diff
changeset
|
177 |
say, Vampire 11.5.}% |
38063 | 178 |
. Since the ATPs' output formats are neither documented nor stable, other |
42763 | 179 |
versions of the ATPs might or might not work well with Sledgehammer. Ideally, |
180 |
also set \texttt{E\_VERSION}, \texttt{SPASS\_VERSION}, or |
|
181 |
\texttt{VAMPIRE\_VERSION} to the ATP's version number (e.g., ``1.2''). |
|
36926 | 182 |
\end{enum} |
183 |
||
42763 | 184 |
To check whether E and SPASS are successfully installed, follow the example in |
185 |
\S\ref{first-steps}. If the remote versions of E and SPASS are used (identified |
|
186 |
by the prefix ``\emph{remote\_}''), or if the local versions fail to solve the |
|
187 |
easy goal presented there, this is a sign that something is wrong with your |
|
188 |
installation. |
|
36926 | 189 |
|
37517
19ba7ec5f1e3
steal some of http://isabelle.in.tum.de/sledgehammer.html and add it to the docs
blanchet
parents:
37498
diff
changeset
|
190 |
Remote ATP invocation via the SystemOnTPTP web service requires Perl with the |
39152
f09b378cb252
make remote ATP invocation work for those people who need to go through a proxy;
blanchet
parents:
38997
diff
changeset
|
191 |
World Wide Web Library (\texttt{libwww-perl}) installed. If you must use a proxy |
f09b378cb252
make remote ATP invocation work for those people who need to go through a proxy;
blanchet
parents:
38997
diff
changeset
|
192 |
server to access the Internet, set the \texttt{http\_proxy} environment variable |
39153 | 193 |
to the proxy, either in the environment in which Isabelle is launched or in your |
41747
f58d4d202924
fix path to etc/settings and etc/components in doc
blanchet
parents:
41740
diff
changeset
|
194 |
\texttt{\char`\~/\$ISABELLE\_HOME\_USER/etc/settings} file. Here are a few examples: |
39152
f09b378cb252
make remote ATP invocation work for those people who need to go through a proxy;
blanchet
parents:
38997
diff
changeset
|
195 |
|
f09b378cb252
make remote ATP invocation work for those people who need to go through a proxy;
blanchet
parents:
38997
diff
changeset
|
196 |
\prew |
39153 | 197 |
\texttt{http\_proxy=http://proxy.example.org} \\ |
198 |
\texttt{http\_proxy=http://proxy.example.org:8080} \\ |
|
199 |
\texttt{http\_proxy=http://joeblow:pAsSwRd@proxy.example.org} |
|
39152
f09b378cb252
make remote ATP invocation work for those people who need to go through a proxy;
blanchet
parents:
38997
diff
changeset
|
200 |
\postw |
37517
19ba7ec5f1e3
steal some of http://isabelle.in.tum.de/sledgehammer.html and add it to the docs
blanchet
parents:
37498
diff
changeset
|
201 |
|
42763 | 202 |
\subsection{Installing SMT Solvers} |
203 |
||
42945 | 204 |
CVC3, Yices, and Z3 can be run locally or (for CVC3 and Z3) remotely on a TU |
205 |
M\"unchen server. If you want better performance and get the ability to replay |
|
206 |
proofs that rely on the \emph{smt} proof method, you should at least install Z3 |
|
207 |
locally. |
|
42763 | 208 |
|
209 |
There are two main ways of installing SMT solvers locally. |
|
210 |
||
211 |
\begin{enum} |
|
212 |
\item[$\bullet$] If you installed an official Isabelle package with everything |
|
213 |
inside, it should already include properly setup executables for CVC3 and Z3, |
|
214 |
ready to use.% |
|
215 |
\footnote{Yices's license prevents us from doing the same for this otherwise |
|
216 |
wonderful tool.} |
|
217 |
For Z3, you additionally need to set the environment variable |
|
218 |
\texttt{Z3\_NON\_COMMERCIAL} to ``yes'' to confirm that you are a noncommercial |
|
219 |
user. |
|
220 |
||
221 |
\item[$\bullet$] Otherwise, follow the instructions documented in the \emph{SMT} |
|
222 |
theory (\texttt{\$ISABELLE\_HOME/src/HOL/SMT.thy}). |
|
223 |
\end{enum} |
|
224 |
||
36926 | 225 |
\section{First Steps} |
226 |
\label{first-steps} |
|
227 |
||
228 |
To illustrate Sledgehammer in context, let us start a theory file and |
|
229 |
attempt to prove a simple lemma: |
|
230 |
||
231 |
\prew |
|
232 |
\textbf{theory}~\textit{Scratch} \\ |
|
233 |
\textbf{imports}~\textit{Main} \\ |
|
234 |
\textbf{begin} \\[2\smallskipamount] |
|
235 |
% |
|
42945 | 236 |
\textbf{lemma} ``$[a] = [b] \,\Longrightarrow\, a = b$'' \\ |
36926 | 237 |
\textbf{sledgehammer} |
238 |
\postw |
|
239 |
||
37517
19ba7ec5f1e3
steal some of http://isabelle.in.tum.de/sledgehammer.html and add it to the docs
blanchet
parents:
37498
diff
changeset
|
240 |
Instead of issuing the \textbf{sledgehammer} command, you can also find |
19ba7ec5f1e3
steal some of http://isabelle.in.tum.de/sledgehammer.html and add it to the docs
blanchet
parents:
37498
diff
changeset
|
241 |
Sledgehammer in the ``Commands'' submenu of the ``Isabelle'' menu in Proof |
19ba7ec5f1e3
steal some of http://isabelle.in.tum.de/sledgehammer.html and add it to the docs
blanchet
parents:
37498
diff
changeset
|
242 |
General or press the Emacs key sequence C-c C-a C-s. |
19ba7ec5f1e3
steal some of http://isabelle.in.tum.de/sledgehammer.html and add it to the docs
blanchet
parents:
37498
diff
changeset
|
243 |
Either way, Sledgehammer produces the following output after a few seconds: |
36926 | 244 |
|
245 |
\prew |
|
246 |
\slshape |
|
40060
5ef6747aa619
first step in adding support for an SMT backend to Sledgehammer
blanchet
parents:
40059
diff
changeset
|
247 |
Sledgehammer: ``\textit{e}'' for subgoal 1: \\ |
42945 | 248 |
$[a] = [b] \,\Longrightarrow\, a = b$ \\ |
249 |
Try this command: \textbf{by} (\textit{metis last\_ConsL}). \\ |
|
250 |
To minimize the number of lemmas, try this: \\ |
|
251 |
\textbf{sledgehammer} \textit{minimize} [\textit{prover} = \textit{e}] (\textit{last\_ConsL}). \\[3\smallskipamount] |
|
252 |
% |
|
253 |
Sledgehammer: ``\textit{vampire}'' for subgoal 1: \\ |
|
254 |
$[a] = [b] \,\Longrightarrow\, a = b$ \\ |
|
36926 | 255 |
Try this command: \textbf{by} (\textit{metis hd.simps}). \\ |
38043 | 256 |
To minimize the number of lemmas, try this: \\ |
42945 | 257 |
\textbf{sledgehammer} \textit{minimize} [\textit{prover} = \textit{vampire}] (\textit{hd.simps}). \\[3\smallskipamount] |
36926 | 258 |
% |
40060
5ef6747aa619
first step in adding support for an SMT backend to Sledgehammer
blanchet
parents:
40059
diff
changeset
|
259 |
Sledgehammer: ``\textit{spass}'' for subgoal 1: \\ |
42945 | 260 |
$[a] = [b] \,\Longrightarrow\, a = b$ \\ |
261 |
Try this command: \textbf{by} (\textit{metis list.inject}). \\ |
|
38043 | 262 |
To minimize the number of lemmas, try this: \\ |
42945 | 263 |
\textbf{sledgehammer} \textit{minimize} [\textit{prover} = \textit{spass}]~(\textit{list.inject}). \\[3\smallskipamount] |
36926 | 264 |
% |
42964
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
265 |
%Sledgehammer: ``\textit{remote\_waldmeister}'' for subgoal 1: \\ |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
266 |
%$[a] = [b] \,\Longrightarrow\, a = b$ \\ |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
267 |
%Try this command: \textbf{by} (\textit{metis hd.simps insert\_Nil}). \\ |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
268 |
%To minimize the number of lemmas, try this: \\ |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
269 |
%\textbf{sledgehammer} \textit{minimize} [\textit{prover} = \textit{remote\_waldmeister}] \\ |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
270 |
%\phantom{\textbf{sledgehammer}~}(\textit{hd.simps insert\_Nil}). \\[3\smallskipamount] |
40073 | 271 |
% |
272 |
Sledgehammer: ``\textit{remote\_sine\_e}'' for subgoal 1: \\ |
|
42945 | 273 |
$[a] = [b] \,\Longrightarrow\, a = b$ \\ |
42846 | 274 |
Try this command: \textbf{by} (\textit{metis hd.simps}). \\ |
40073 | 275 |
To minimize the number of lemmas, try this: \\ |
42846 | 276 |
\textbf{sledgehammer} \textit{minimize} [\textit{prover} = \textit{remote\_sine\_e}]~(\textit{hd.simps}). \\[3\smallskipamount] |
40942 | 277 |
% |
278 |
Sledgehammer: ``\textit{remote\_z3}'' for subgoal 1: \\ |
|
42945 | 279 |
$[a] = [b] \,\Longrightarrow\, a = b$ \\ |
42846 | 280 |
Try this command: \textbf{by} (\textit{metis hd.simps}). \\ |
40942 | 281 |
To minimize the number of lemmas, try this: \\ |
42945 | 282 |
\textbf{sledgehammer} \textit{minimize} [\textit{prover} = \textit{remote\_z3}]~(\textit{hd.simps}). |
36926 | 283 |
\postw |
284 |
||
42964
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
285 |
Sledgehammer ran E, SInE-E, SPASS, Vampire, %Waldmeister, |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
286 |
and Z3 in parallel. |
42945 | 287 |
Depending on which provers are installed and how many processor cores are |
288 |
available, some of the provers might be missing or present with a |
|
42964
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
289 |
\textit{remote\_} prefix. |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
290 |
%Waldmeister is run only for unit equational problems, |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
291 |
%where the goal's conclusion is a (universally quantified) equation. |
36926 | 292 |
|
40073 | 293 |
For each successful prover, Sledgehammer gives a one-liner proof that uses the |
294 |
\textit{metis} or \textit{smt} method. You can click the proof to insert it into |
|
295 |
the theory text. You can click the ``\textbf{sledgehammer} \textit{minimize}'' |
|
296 |
command if you want to look for a shorter (and probably faster) proof. But here |
|
297 |
the proof found by E looks perfect, so click it to finish the proof. |
|
36926 | 298 |
|
299 |
You can ask Sledgehammer for an Isar text proof by passing the |
|
42883 | 300 |
\textit{isar\_proof} option (\S\ref{output-format}): |
36926 | 301 |
|
302 |
\prew |
|
303 |
\textbf{sledgehammer} [\textit{isar\_proof}] |
|
304 |
\postw |
|
305 |
||
306 |
When Isar proof construction is successful, it can yield proofs that are more |
|
307 |
readable and also faster than the \textit{metis} one-liners. This feature is |
|
40073 | 308 |
experimental and is only available for ATPs. |
36926 | 309 |
|
37517
19ba7ec5f1e3
steal some of http://isabelle.in.tum.de/sledgehammer.html and add it to the docs
blanchet
parents:
37498
diff
changeset
|
310 |
\section{Hints} |
19ba7ec5f1e3
steal some of http://isabelle.in.tum.de/sledgehammer.html and add it to the docs
blanchet
parents:
37498
diff
changeset
|
311 |
\label{hints} |
19ba7ec5f1e3
steal some of http://isabelle.in.tum.de/sledgehammer.html and add it to the docs
blanchet
parents:
37498
diff
changeset
|
312 |
|
42884 | 313 |
This section presents a few hints that should help you get the most out of |
314 |
Sledgehammer and Metis. Frequently (and infrequently) asked questions are |
|
315 |
answered in \S\ref{frequently-asked-questions}. |
|
316 |
||
42945 | 317 |
\newcommand\point[1]{\medskip\par{\sl\bfseries#1}\par\nopagebreak} |
42763 | 318 |
|
319 |
\point{Presimplify the goal} |
|
320 |
||
37517
19ba7ec5f1e3
steal some of http://isabelle.in.tum.de/sledgehammer.html and add it to the docs
blanchet
parents:
37498
diff
changeset
|
321 |
For best results, first simplify your problem by calling \textit{auto} or at |
42945 | 322 |
least \textit{safe} followed by \textit{simp\_all}. The SMT solvers provide |
323 |
arithmetic decision procedures, but the ATPs typically do not (or if they do, |
|
324 |
Sledgehammer does not use it yet). Apart from Waldmeister, they are not |
|
325 |
especially good at heavy rewriting, but because they regard equations as |
|
326 |
undirected, they often prove theorems that require the reverse orientation of a |
|
327 |
\textit{simp} rule. Higher-order problems can be tackled, but the success rate |
|
328 |
is better for first-order problems. Hence, you may get better results if you |
|
329 |
first simplify the problem to remove higher-order features. |
|
37517
19ba7ec5f1e3
steal some of http://isabelle.in.tum.de/sledgehammer.html and add it to the docs
blanchet
parents:
37498
diff
changeset
|
330 |
|
42763 | 331 |
\point{Make sure at least E, SPASS, Vampire, and Z3 are installed} |
332 |
||
333 |
Locally installed provers are faster and more reliable than those running on |
|
334 |
servers. See \S\ref{installation} for details on how to install them. |
|
335 |
||
336 |
\point{Familiarize yourself with the most important options} |
|
337 |
||
338 |
Sledgehammer's options are fully documented in \S\ref{command-syntax}. Many of |
|
339 |
the options are very specialized, but serious users of the tool should at least |
|
340 |
familiarize themselves with the following options: |
|
341 |
||
342 |
\begin{enum} |
|
42884 | 343 |
\item[$\bullet$] \textbf{\textit{provers}} (\S\ref{mode-of-operation}) specifies |
344 |
the automatic provers (ATPs and SMT solvers) that should be run whenever |
|
345 |
Sledgehammer is invoked (e.g., ``\textit{provers}~= \textit{e spass |
|
346 |
remote\_vampire}''). |
|
42763 | 347 |
|
42884 | 348 |
\item[$\bullet$] \textbf{\textit{timeout}} (\S\ref{mode-of-operation}) controls |
349 |
the provers' time limit. It is set to 30 seconds, but since Sledgehammer runs |
|
350 |
asynchronously you should not hesitate to raise this limit to 60 or 120 seconds |
|
351 |
if you are the kind of user who can think clearly while ATPs are active. |
|
42763 | 352 |
|
42884 | 353 |
\item[$\bullet$] \textbf{\textit{full\_types}} (\S\ref{problem-encoding}) |
354 |
specifies whether type-sound encodings should be used. By default, Sledgehammer |
|
355 |
employs a mixture of type-sound and type-unsound encodings, occasionally |
|
356 |
yielding unsound ATP proofs. (SMT solver proofs should always be sound, although |
|
357 |
we occasionally find soundness bugs in the solvers.) |
|
42763 | 358 |
|
42884 | 359 |
\item[$\bullet$] \textbf{\textit{max\_relevant}} (\S\ref{relevance-filter}) |
360 |
specifies the maximum number of facts that should be passed to the provers. By |
|
361 |
default, the value is prover-dependent but varies between about 150 and 1000. If |
|
362 |
the provers time out, you can try lowering this value to, say, 100 or 50 and see |
|
363 |
if that helps. |
|
42763 | 364 |
|
42884 | 365 |
\item[$\bullet$] \textbf{\textit{isar\_proof}} (\S\ref{output-format}) specifies |
366 |
that Isar proofs should be generated, instead of one-liner Metis proofs. The |
|
367 |
length of the Isar proofs can be controlled by setting |
|
368 |
\textit{isar\_shrink\_factor} (\S\ref{output-format}). |
|
42763 | 369 |
\end{enum} |
370 |
||
42884 | 371 |
Options can be set globally using \textbf{sledgehammer\_params} |
372 |
(\S\ref{command-syntax}). Fact selection can be influenced by specifying |
|
373 |
``$(\textit{add}{:}~\textit{my\_facts})$'' after the \textbf{sledgehammer} |
|
374 |
call to ensure that certain facts are included, or simply |
|
375 |
``$(\textit{my\_facts})$'' to force Sledgehammer to run only with |
|
376 |
$\textit{my\_facts}$. |
|
42763 | 377 |
|
378 |
\section{Frequently Asked Questions} |
|
379 |
\label{frequently-asked-questions} |
|
380 |
||
42945 | 381 |
This sections answers frequently (and infrequently) asked questions about |
382 |
Sledgehammer. It is a good idea to skim over it now even if you don't have any |
|
383 |
questions at this stage. And if you have any further questions not listed here, |
|
384 |
send them to the author at \authoremail. |
|
385 |
||
42763 | 386 |
\point{Why does Metis fail to reconstruct the proof?} |
387 |
||
42883 | 388 |
There are many reasons. If Metis runs seemingly forever, that is a sign that the |
389 |
proof is too difficult for it. Metis is complete, so it should eventually find |
|
390 |
it, but that's little consolation. There are several possible solutions: |
|
42763 | 391 |
|
392 |
\begin{enum} |
|
42883 | 393 |
\item[$\bullet$] Try the \textit{isar\_proof} option (\S\ref{output-format}) to |
394 |
obtain a step-by-step Isar proof where each step is justified by Metis. Since |
|
395 |
the steps are fairly small, Metis is more likely to be able to replay them. |
|
42763 | 396 |
|
397 |
\item[$\bullet$] Try the \textit{smt} proof method instead of \textit{metis}. It |
|
398 |
is usually stronger, but you need to have Z3 available to replay the proofs, |
|
399 |
trust the SMT solver, or use certificates. See the documentation in the |
|
400 |
\emph{SMT} theory (\texttt{\$ISABELLE\_HOME/src/HOL/SMT.thy}) for details. |
|
401 |
||
402 |
\item[$\bullet$] Try the \textit{blast} or \textit{auto} proof methods, passing |
|
403 |
facts via \textbf{unfolding}, \textbf{using}, \textit{intro}{:}, |
|
404 |
\textit{elim}{:}, \textit{dest}{:}, or \textit{simp}{:}, as appropriate. |
|
405 |
\end{enum} |
|
406 |
||
42883 | 407 |
In some rare cases, Metis fails fairly quickly. This usually indicates that |
408 |
Sledgehammer found a type-incorrect proof. Sledgehammer erases some type |
|
409 |
information to speed up the search. Try Sledgehammer again with full type |
|
410 |
information: \textit{full\_types} (\S\ref{problem-encoding}), or choose a |
|
411 |
specific type encoding with \textit{type\_sys} (\S\ref{problem-encoding}). Older |
|
412 |
versions of Sledgehammer were frequent victims of this problem. Now this should |
|
413 |
very seldom be an issue, but if you notice many unsound proofs, contact the |
|
414 |
author at \authoremail. |
|
415 |
||
416 |
\point{How can I tell whether a Sledgehammer proof is sound?} |
|
417 |
||
418 |
First, if \emph{metis} (or \emph{metisFT}) can reconstruct it, the proof is |
|
419 |
sound (modulo soundness of Isabelle's inference kernel). If it fails or runs |
|
420 |
seemingly forever, you can try |
|
421 |
||
422 |
\prew |
|
423 |
\textbf{apply}~\textbf{--} \\ |
|
424 |
\textbf{sledgehammer} [\textit{type\_sys} = \textit{poly\_tags}] (\textit{metis\_facts}) |
|
425 |
\postw |
|
426 |
||
427 |
where \textit{metis\_facts} is the list of facts appearing in the suggested |
|
428 |
Metis call. The automatic provers should be able to refind the proof very |
|
429 |
quickly if it is sound, and the \textit{type\_sys} $=$ \textit{poly\_tags} |
|
430 |
option (\S\ref{problem-encoding}) ensures that no unsound proofs are found. |
|
431 |
||
432 |
The \textit{full\_types} option (\S\ref{problem-encoding}) can also be used |
|
433 |
here, but it is unsound in extremely rare degenerate cases such as the |
|
434 |
following: |
|
435 |
||
436 |
\prew |
|
42945 | 437 |
\textbf{lemma} ``$\forall x\> y\Colon{'}\!a.\ x = y \,\Longrightarrow \exists f\> g\Colon\mathit{nat} \Rightarrow {'}\!a.\ f \not= g$'' \\ |
42883 | 438 |
\textbf{sledgehammer} [\textit{full\_types}] (\textit{nat.distinct\/}(1)) |
439 |
\postw |
|
440 |
||
441 |
\point{How does Sledgehammer select the facts that should be passed to the |
|
442 |
automatic provers?} |
|
443 |
||
444 |
Briefly, the relevance filter assigns a score to every available fact (lemma, |
|
445 |
theorem, definition, or axiom)\ based upon how many constants that fact shares |
|
42945 | 446 |
with the conjecture. This process iterates to include facts relevant to those |
42883 | 447 |
just accepted, but with a decay factor to ensure termination. The constants are |
448 |
weighted to give unusual ones greater significance. The relevance filter copes |
|
449 |
best when the conjecture contains some unusual constants; if all the constants |
|
450 |
are common, it is unable to discriminate among the hundreds of facts that are |
|
451 |
picked up. The relevance filter is also memoryless: It has no information about |
|
452 |
how many times a particular fact has been used in a proof, and it cannot learn. |
|
42763 | 453 |
|
42883 | 454 |
The number of facts included in a problem varies from prover to prover, since |
455 |
some provers get overwhelmed quicker than others. You can show the number of |
|
456 |
facts given using the \textit{verbose} option (\S\ref{output-format}) and the |
|
457 |
actual facts using \textit{debug} (\S\ref{output-format}). |
|
458 |
||
459 |
Sledgehammer is good at finding short proofs combining a handful of existing |
|
460 |
lemmas. If you are looking for longer proofs, you must typically restrict the |
|
42884 | 461 |
number of facts, by setting the \textit{max\_relevant} option |
462 |
(\S\ref{relevance-filter}) to, say, 50 or 100. |
|
42883 | 463 |
|
464 |
\point{Why are the Isar proofs generated by Sledgehammer so ugly?} |
|
465 |
||
466 |
The current implementation is experimental and explodes exponentially in the |
|
467 |
worst case. Work on a new implementation has begun. There is a large body of |
|
468 |
research into transforming resolution proofs into natural deduction proofs (such |
|
469 |
as Isar proofs), which we hope to leverage. In the meantime, a workaround is to |
|
470 |
set the \textit{isar\_shrink\_factor} option (\S\ref{output-format}) to a larger |
|
471 |
value or to try several provers and keep the nicest-looking proof. |
|
472 |
||
473 |
\point{Should I let Sledgehammer minimize the number of lemmas?} |
|
474 |
||
475 |
In general, minimization is a good idea, because proofs involving fewer lemmas |
|
476 |
tend to be shorter as well, and hence easier to re-find by Metis. But the |
|
477 |
opposite is sometimes the case. |
|
478 |
||
479 |
\point{Why does the minimizer sometimes starts of its own?} |
|
480 |
||
481 |
There are two scenarios in which this can happen. First, some provers (e.g., |
|
482 |
CVC3 and Yices) do not provide proofs or provide incomplete proofs. The |
|
483 |
minimizer is then invoked to find out which facts are actually needed from the |
|
484 |
(large) set of facts that was initinally given to the prover. Second, if a |
|
485 |
prover returns a proof with lots of facts, the minimizer is invoked |
|
486 |
automatically since Metis is unlikely to refind the proof. |
|
487 |
||
488 |
\point{What is metisFT?} |
|
489 |
||
490 |
The \textit{metisFT} proof method is the fully-typed version of Metis. It is |
|
491 |
much slower than \textit{metis}, but the proof search is fully typed, and it |
|
492 |
also includes more powerful rules such as the axiom ``$x = \mathit{True} |
|
493 |
\mathrel{\lor} x = \mathit{False}$'' for reasoning in higher-order places (e.g., |
|
494 |
in set comprehensions). The method kicks in automatically as a fallback when |
|
495 |
\textit{metis} fails, and it is sometimes generated by Sledgehammer instead of |
|
496 |
\textit{metis} if the proof obviously requires type information. |
|
497 |
||
498 |
If you see the warning |
|
499 |
||
500 |
\prew |
|
501 |
\textsl |
|
502 |
Metis: Falling back on ``\textit{metisFT}''. |
|
503 |
\postw |
|
504 |
||
505 |
in a successful Metis proof, you can advantageously replace the \textit{metis} |
|
506 |
call with \textit{metisFT}. |
|
42850
c8709be8a40f
distinguish between a soft timeout (30 s by defalt) and a hard timeout (60 s), to let minimization-based provers (such as CVC3, Yices, and occasionally the other provers) do their job
blanchet
parents:
42846
diff
changeset
|
507 |
|
42763 | 508 |
\point{I got a strange error from Sledgehammer---what should I do?} |
509 |
||
510 |
Sledgehammer tries to give informative error messages. Please report any strange |
|
42883 | 511 |
error to the author at \authoremail. This applies double if you get the message |
42763 | 512 |
|
42883 | 513 |
\prew |
42763 | 514 |
\slshape |
42877 | 515 |
The prover found a type-unsound proof involving ``\textit{foo}'', |
516 |
``\textit{bar}'', ``\textit{baz}'' even though a supposedly type-sound encoding |
|
517 |
was used (or, less likely, your axioms are inconsistent). You might want to |
|
518 |
report this to the Isabelle developers. |
|
42883 | 519 |
\postw |
42763 | 520 |
|
521 |
\point{Auto can solve it---why not Sledgehammer?} |
|
522 |
||
523 |
Problems can be easy for \textit{auto} and difficult for automatic provers, but |
|
524 |
the reverse is also true, so don't be discouraged if your first attempts fail. |
|
39320 | 525 |
Because the system refers to all theorems known to Isabelle, it is particularly |
526 |
suitable when your goal has a short proof from lemmas that you don't know about. |
|
37517
19ba7ec5f1e3
steal some of http://isabelle.in.tum.de/sledgehammer.html and add it to the docs
blanchet
parents:
37498
diff
changeset
|
527 |
|
42883 | 528 |
\point{Why are there so many options?} |
529 |
||
530 |
Sledgehammer's philosophy should work out of the box, without user guidance. |
|
531 |
Many of the options are meant to be used mostly by the Sledgehammer developers |
|
532 |
for experimentation purposes. Of course, feel free to experiment with them if |
|
533 |
you are so inclined. |
|
534 |
||
36926 | 535 |
\section{Command Syntax} |
536 |
\label{command-syntax} |
|
537 |
||
538 |
Sledgehammer can be invoked at any point when there is an open goal by entering |
|
539 |
the \textbf{sledgehammer} command in the theory file. Its general syntax is as |
|
540 |
follows: |
|
541 |
||
542 |
\prew |
|
543 |
\textbf{sledgehammer} \textit{subcommand\/$^?$ options\/$^?$ facts\_override\/$^?$ num\/$^?$} |
|
544 |
\postw |
|
545 |
||
546 |
For convenience, Sledgehammer is also available in the ``Commands'' submenu of |
|
547 |
the ``Isabelle'' menu in Proof General or by pressing the Emacs key sequence C-c |
|
548 |
C-a C-s. This is equivalent to entering the \textbf{sledgehammer} command with |
|
549 |
no arguments in the theory text. |
|
550 |
||
551 |
In the general syntax, the \textit{subcommand} may be any of the following: |
|
552 |
||
553 |
\begin{enum} |
|
40203 | 554 |
\item[$\bullet$] \textbf{\textit{run} (the default):} Runs Sledgehammer on |
555 |
subgoal number \textit{num} (1 by default), with the given options and facts. |
|
36926 | 556 |
|
557 |
\item[$\bullet$] \textbf{\textit{minimize}:} Attempts to minimize the provided facts |
|
558 |
(specified in the \textit{facts\_override} argument) to obtain a simpler proof |
|
559 |
involving fewer facts. The options and goal number are as for \textit{run}. |
|
560 |
||
40203 | 561 |
\item[$\bullet$] \textbf{\textit{messages}:} Redisplays recent messages issued |
562 |
by Sledgehammer. This allows you to examine results that might have been lost |
|
563 |
due to Sledgehammer's asynchronous nature. The \textit{num} argument specifies a |
|
36926 | 564 |
limit on the number of messages to display (5 by default). |
565 |
||
41727
ab3f6d76fb23
available_provers ~> supported_provers (for clarity)
blanchet
parents:
41724
diff
changeset
|
566 |
\item[$\bullet$] \textbf{\textit{supported\_provers}:} Prints the list of |
41724 | 567 |
automatic provers supported by Sledgehammer. See \S\ref{installation} and |
568 |
\S\ref{mode-of-operation} for more information on how to install automatic |
|
569 |
provers. |
|
36926 | 570 |
|
40059
6ad9081665db
use consistent terminology in Sledgehammer: "prover = ATP or SMT solver or ..."
blanchet
parents:
39335
diff
changeset
|
571 |
\item[$\bullet$] \textbf{\textit{running\_provers}:} Prints information about |
6ad9081665db
use consistent terminology in Sledgehammer: "prover = ATP or SMT solver or ..."
blanchet
parents:
39335
diff
changeset
|
572 |
currently running automatic provers, including elapsed runtime and remaining |
6ad9081665db
use consistent terminology in Sledgehammer: "prover = ATP or SMT solver or ..."
blanchet
parents:
39335
diff
changeset
|
573 |
time until timeout. |
36926 | 574 |
|
40059
6ad9081665db
use consistent terminology in Sledgehammer: "prover = ATP or SMT solver or ..."
blanchet
parents:
39335
diff
changeset
|
575 |
\item[$\bullet$] \textbf{\textit{kill\_provers}:} Terminates all running |
6ad9081665db
use consistent terminology in Sledgehammer: "prover = ATP or SMT solver or ..."
blanchet
parents:
39335
diff
changeset
|
576 |
automatic provers. |
36926 | 577 |
|
578 |
\item[$\bullet$] \textbf{\textit{refresh\_tptp}:} Refreshes the list of remote |
|
579 |
ATPs available at System\-On\-TPTP \cite{sutcliffe-2000}. |
|
580 |
\end{enum} |
|
581 |
||
582 |
Sledgehammer's behavior can be influenced by various \textit{options}, which can |
|
583 |
be specified in brackets after the \textbf{sledgehammer} command. The |
|
584 |
\textit{options} are a list of key--value pairs of the form ``[$k_1 = v_1, |
|
585 |
\ldots, k_n = v_n$]''. For Boolean options, ``= \textit{true}'' is optional. For |
|
586 |
example: |
|
587 |
||
588 |
\prew |
|
589 |
\textbf{sledgehammer} [\textit{isar\_proof}, \,\textit{timeout} = 120$\,s$] |
|
590 |
\postw |
|
591 |
||
592 |
Default values can be set using \textbf{sledgehammer\_\allowbreak params}: |
|
593 |
||
594 |
\prew |
|
595 |
\textbf{sledgehammer\_params} \textit{options} |
|
596 |
\postw |
|
597 |
||
598 |
The supported options are described in \S\ref{option-reference}. |
|
599 |
||
600 |
The \textit{facts\_override} argument lets you alter the set of facts that go |
|
601 |
through the relevance filter. It may be of the form ``(\textit{facts})'', where |
|
602 |
\textit{facts} is a space-separated list of Isabelle facts (theorems, local |
|
603 |
assumptions, etc.), in which case the relevance filter is bypassed and the given |
|
39320 | 604 |
facts are used. It may also be of the form ``(\textit{add}:\ \textit{facts}$_1$)'', |
605 |
``(\textit{del}:\ \textit{facts}$_2$)'', or ``(\textit{add}:\ \textit{facts}$_1$\ |
|
606 |
\textit{del}:\ \textit{facts}$_2$)'', where the relevance filter is instructed to |
|
36926 | 607 |
proceed as usual except that it should consider \textit{facts}$_1$ |
608 |
highly-relevant and \textit{facts}$_2$ fully irrelevant. |
|
609 |
||
39320 | 610 |
You can instruct Sledgehammer to run automatically on newly entered theorems by |
611 |
enabling the ``Auto Sledgehammer'' option from the ``Isabelle'' menu in Proof |
|
40059
6ad9081665db
use consistent terminology in Sledgehammer: "prover = ATP or SMT solver or ..."
blanchet
parents:
39335
diff
changeset
|
612 |
General. For automatic runs, only the first prover set using \textit{provers} |
42736
8005fc9b65ec
ensure that Auto Sledgehammer is run with full type information
blanchet
parents:
42724
diff
changeset
|
613 |
(\S\ref{mode-of-operation}) is considered, fewer facts are passed to the prover, |
8005fc9b65ec
ensure that Auto Sledgehammer is run with full type information
blanchet
parents:
42724
diff
changeset
|
614 |
\textit{slicing} (\S\ref{mode-of-operation}) is disabled, \textit{timeout} |
40073 | 615 |
(\S\ref{mode-of-operation}) is superseded by the ``Auto Tools Time Limit'' in |
42736
8005fc9b65ec
ensure that Auto Sledgehammer is run with full type information
blanchet
parents:
42724
diff
changeset
|
616 |
Proof General's ``Isabelle'' menu, \textit{full\_types} |
8005fc9b65ec
ensure that Auto Sledgehammer is run with full type information
blanchet
parents:
42724
diff
changeset
|
617 |
(\S\ref{problem-encoding}) is enabled, and \textit{verbose} |
8005fc9b65ec
ensure that Auto Sledgehammer is run with full type information
blanchet
parents:
42724
diff
changeset
|
618 |
(\S\ref{output-format}) and \textit{debug} (\S\ref{output-format}) are disabled. |
8005fc9b65ec
ensure that Auto Sledgehammer is run with full type information
blanchet
parents:
42724
diff
changeset
|
619 |
Sledgehammer's output is also more concise. |
39320 | 620 |
|
36926 | 621 |
\section{Option Reference} |
622 |
\label{option-reference} |
|
623 |
||
624 |
\def\flushitem#1{\item[]\noindent\kern-\leftmargin \textbf{#1}} |
|
625 |
\def\qty#1{$\left<\textit{#1}\right>$} |
|
626 |
\def\qtybf#1{$\mathbf{\left<\textbf{\textit{#1}}\right>}$} |
|
627 |
\def\optrue#1#2{\flushitem{\textit{#1} $\bigl[$= \qtybf{bool}$\bigr]$\quad [\textit{true}]\hfill (neg.: \textit{#2})}\nopagebreak\\[\parskip]} |
|
628 |
\def\opfalse#1#2{\flushitem{\textit{#1} $\bigl[$= \qtybf{bool}$\bigr]$\quad [\textit{false}]\hfill (neg.: \textit{#2})}\nopagebreak\\[\parskip]} |
|
629 |
\def\opsmart#1#2{\flushitem{\textit{#1} $\bigl[$= \qtybf{bool\_or\_smart}$\bigr]$\quad [\textit{smart}]\hfill (neg.: \textit{#2})}\nopagebreak\\[\parskip]} |
|
630 |
\def\opsmartx#1#2{\flushitem{\textit{#1} $\bigl[$= \qtybf{bool\_or\_smart}$\bigr]$\quad [\textit{smart}]\hfill\\\hbox{}\hfill (neg.: \textit{#2})}\nopagebreak\\[\parskip]} |
|
631 |
\def\opnodefault#1#2{\flushitem{\textit{#1} = \qtybf{#2}} \nopagebreak\\[\parskip]} |
|
632 |
\def\opdefault#1#2#3{\flushitem{\textit{#1} = \qtybf{#2}\quad [\textit{#3}]} \nopagebreak\\[\parskip]} |
|
633 |
\def\oparg#1#2#3{\flushitem{\textit{#1} \qtybf{#2} = \qtybf{#3}} \nopagebreak\\[\parskip]} |
|
634 |
\def\opargbool#1#2#3{\flushitem{\textit{#1} \qtybf{#2} $\bigl[$= \qtybf{bool}$\bigr]$\hfill (neg.: \textit{#3})}\nopagebreak\\[\parskip]} |
|
635 |
\def\opargboolorsmart#1#2#3{\flushitem{\textit{#1} \qtybf{#2} $\bigl[$= \qtybf{bool\_or\_smart}$\bigr]$\hfill (neg.: \textit{#3})}\nopagebreak\\[\parskip]} |
|
636 |
||
637 |
Sledgehammer's options are categorized as follows:\ mode of operation |
|
38984 | 638 |
(\S\ref{mode-of-operation}), problem encoding (\S\ref{problem-encoding}), |
639 |
relevance filter (\S\ref{relevance-filter}), output format |
|
640 |
(\S\ref{output-format}), and authentication (\S\ref{authentication}). |
|
36926 | 641 |
|
642 |
The descriptions below refer to the following syntactic quantities: |
|
643 |
||
644 |
\begin{enum} |
|
645 |
\item[$\bullet$] \qtybf{string}: A string. |
|
646 |
\item[$\bullet$] \qtybf{bool\/}: \textit{true} or \textit{false}. |
|
40203 | 647 |
\item[$\bullet$] \qtybf{bool\_or\_smart\/}: \textit{true}, \textit{false}, or |
648 |
\textit{smart}. |
|
36926 | 649 |
\item[$\bullet$] \qtybf{int\/}: An integer. |
42724
4d6bcf846759
added "max_mono_instances" option to Sledgehammer and renamed old "monomorphize_limit" option
blanchet
parents:
42722
diff
changeset
|
650 |
%\item[$\bullet$] \qtybf{float\/}: A floating-point number (e.g., 2.5). |
40343
4521d56aef63
use floating-point numbers for Sledgehammer's "thresholds" option rather than percentages;
blanchet
parents:
40341
diff
changeset
|
651 |
\item[$\bullet$] \qtybf{float\_pair\/}: A pair of floating-point numbers |
4521d56aef63
use floating-point numbers for Sledgehammer's "thresholds" option rather than percentages;
blanchet
parents:
40341
diff
changeset
|
652 |
(e.g., 0.6 0.95). |
38591 | 653 |
\item[$\bullet$] \qtybf{int\_or\_smart\/}: An integer or \textit{smart}. |
40343
4521d56aef63
use floating-point numbers for Sledgehammer's "thresholds" option rather than percentages;
blanchet
parents:
40341
diff
changeset
|
654 |
\item[$\bullet$] \qtybf{float\_or\_none\/}: An integer (e.g., 60) or |
4521d56aef63
use floating-point numbers for Sledgehammer's "thresholds" option rather than percentages;
blanchet
parents:
40341
diff
changeset
|
655 |
floating-point number (e.g., 0.5) expressing a number of seconds, or the keyword |
4521d56aef63
use floating-point numbers for Sledgehammer's "thresholds" option rather than percentages;
blanchet
parents:
40341
diff
changeset
|
656 |
\textit{none} ($\infty$ seconds). |
36926 | 657 |
\end{enum} |
658 |
||
659 |
Default values are indicated in square brackets. Boolean options have a negated |
|
38984 | 660 |
counterpart (e.g., \textit{blocking} vs.\ \textit{non\_blocking}). When setting |
36926 | 661 |
Boolean options, ``= \textit{true}'' may be omitted. |
662 |
||
663 |
\subsection{Mode of Operation} |
|
664 |
\label{mode-of-operation} |
|
665 |
||
666 |
\begin{enum} |
|
40059
6ad9081665db
use consistent terminology in Sledgehammer: "prover = ATP or SMT solver or ..."
blanchet
parents:
39335
diff
changeset
|
667 |
\opnodefault{provers}{string} |
6ad9081665db
use consistent terminology in Sledgehammer: "prover = ATP or SMT solver or ..."
blanchet
parents:
39335
diff
changeset
|
668 |
Specifies the automatic provers to use as a space-separated list (e.g., |
42945 | 669 |
``\textit{e}~\textit{spass}''). The following local provers are supported: |
36926 | 670 |
|
671 |
\begin{enum} |
|
42945 | 672 |
\item[$\bullet$] \textbf{\textit{cvc3}:} CVC3 is an SMT solver developed by |
673 |
Clark Barrett, Cesare Tinelli, and their colleagues \cite{cvc3}. To use CVC3, |
|
674 |
set the environment variable \texttt{CVC3\_SOLVER} to the complete path of the |
|
675 |
executable, including the file name. Sledgehammer has been tested with version |
|
676 |
2.2. |
|
677 |
||
42964
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
678 |
\item[$\bullet$] \textbf{\textit{e}:} E is a first-order resolution prover |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
679 |
developed by Stephan Schulz \cite{schulz-2002}. To use E, set the environment |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
680 |
variable \texttt{E\_HOME} to the directory that contains the \texttt{eproof} |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
681 |
executable, or install the prebuilt E package from Isabelle's download page. See |
36926 | 682 |
\S\ref{installation} for details. |
683 |
||
42964
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
684 |
\item[$\bullet$] \textbf{\textit{spass}:} SPASS is a first-order resolution |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
685 |
prover developed by Christoph Weidenbach et al.\ \cite{weidenbach-et-al-2009}. |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
686 |
To use SPASS, set the environment variable \texttt{SPASS\_HOME} to the directory |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
687 |
that contains the \texttt{SPASS} executable, or install the prebuilt SPASS |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
688 |
package from Isabelle's download page. Sledgehammer requires version 3.5 or |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
689 |
above. See \S\ref{installation} for details. |
36926 | 690 |
|
42945 | 691 |
\item[$\bullet$] \textbf{\textit{yices}:} Yices is an SMT solver developed at |
692 |
SRI \cite{yices}. To use Yices, set the environment variable |
|
693 |
\texttt{YICES\_SOLVER} to the complete path of the executable, including the |
|
694 |
file name. Sledgehammer has been tested with version 1.0. |
|
695 |
||
42964
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
696 |
\item[$\bullet$] \textbf{\textit{vampire}:} Vampire is a first-order resolution |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
697 |
prover developed by Andrei Voronkov and his colleagues |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
698 |
\cite{riazanov-voronkov-2002}. To use Vampire, set the environment variable |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
699 |
\texttt{VAMPIRE\_HOME} to the directory that contains the \texttt{vampire} |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
700 |
executable. Sledgehammer has been tested with versions 11, 0.6, and 1.0. |
40942 | 701 |
|
41740
4b09f8b9e012
added "Z3 as an ATP" support to Sledgehammer locally
blanchet
parents:
41738
diff
changeset
|
702 |
\item[$\bullet$] \textbf{\textit{z3}:} Z3 is an SMT solver developed at |
4b09f8b9e012
added "Z3 as an ATP" support to Sledgehammer locally
blanchet
parents:
41738
diff
changeset
|
703 |
Microsoft Research \cite{z3}. To use Z3, set the environment variable |
4b09f8b9e012
added "Z3 as an ATP" support to Sledgehammer locally
blanchet
parents:
41738
diff
changeset
|
704 |
\texttt{Z3\_SOLVER} to the complete path of the executable, including the file |
42945 | 705 |
name, and set \texttt{Z3\_NON\_COMMERCIAL=yes} to confirm that you are a |
706 |
noncommercial user. Sledgehammer has been tested with versions 2.7 to 2.18. |
|
41740
4b09f8b9e012
added "Z3 as an ATP" support to Sledgehammer locally
blanchet
parents:
41738
diff
changeset
|
707 |
|
4b09f8b9e012
added "Z3 as an ATP" support to Sledgehammer locally
blanchet
parents:
41738
diff
changeset
|
708 |
\item[$\bullet$] \textbf{\textit{z3\_atp}:} This version of Z3 pretends to be an |
4b09f8b9e012
added "Z3 as an ATP" support to Sledgehammer locally
blanchet
parents:
41738
diff
changeset
|
709 |
ATP, exploiting Z3's undocumented support for the TPTP format. It is included |
42442 | 710 |
for experimental purposes. It requires version 2.18 or above. |
42945 | 711 |
\end{enum} |
712 |
||
713 |
In addition, the following remote provers are supported: |
|
714 |
||
715 |
\begin{enum} |
|
716 |
\item[$\bullet$] \textbf{\textit{remote\_cvc3}:} The remote version of CVC3 runs |
|
717 |
on servers at the TU M\"unchen (or wherever \texttt{REMOTE\_SMT\_URL} is set to |
|
718 |
point). |
|
40073 | 719 |
|
38601 | 720 |
\item[$\bullet$] \textbf{\textit{remote\_e}:} The remote version of E runs |
36926 | 721 |
on Geoff Sutcliffe's Miami servers \cite{sutcliffe-2000}. |
722 |
||
42964
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
723 |
\item[$\bullet$] \textbf{\textit{remote\_leo2}:} LEO-II is an automatic |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
724 |
higher-order prover developed by Christoph Benzm\"uller et al. \cite{leo2}. The |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
725 |
remote version of LEO-II runs on Geoff Sutcliffe's Miami servers. In the current |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
726 |
setup, the problems given to LEO-II are only mildly higher-order. |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
727 |
|
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
728 |
\item[$\bullet$] \textbf{\textit{remote\_satallax}:} Satallax is an automatic |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
729 |
higher-order prover developed by Chad Brown et al. \cite{satallax}. The remote |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
730 |
version of Satallax runs on Geoff Sutcliffe's Miami servers. In the current |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
731 |
setup, the problems given to Satallax are only mildly higher-order. |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
732 |
|
38601 | 733 |
\item[$\bullet$] \textbf{\textit{remote\_sine\_e}:} SInE-E is a metaprover |
734 |
developed by Kry\v stof Hoder \cite{sine} based on E. The remote version of |
|
735 |
SInE runs on Geoff Sutcliffe's Miami servers. |
|
736 |
||
42964
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
737 |
\item[$\bullet$] \textbf{\textit{remote\_snark}:} SNARK is a first-order |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
738 |
resolution prover developed by Stickel et al.\ \cite{snark}. The remote version |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
739 |
of SNARK runs on Geoff Sutcliffe's Miami servers. |
40073 | 740 |
|
42945 | 741 |
\item[$\bullet$] \textbf{\textit{remote\_tofof\_e}:} ToFoF-E is a metaprover |
742 |
developed by Geoff Sutcliffe \cite{tofof} based on E running on his Miami |
|
743 |
servers. This ATP supports a fragment of the TPTP many-typed first-order format |
|
744 |
(TFF). It is supported primarily for experimenting with the |
|
745 |
\textit{type\_sys} $=$ \textit{simple} option (\S\ref{problem-encoding}). |
|
42940 | 746 |
|
42945 | 747 |
\item[$\bullet$] \textbf{\textit{remote\_vampire}:} The remote version of |
748 |
Vampire runs on Geoff Sutcliffe's Miami servers. Version 9 is used. |
|
749 |
||
750 |
\item[$\bullet$] \textbf{\textit{remote\_waldmeister}:} Waldmeister is a unit |
|
751 |
equality prover developed by Hillenbrand et al.\ \cite{waldmeister}. It can be |
|
752 |
used to prove universally quantified equations using unconditional equations. |
|
753 |
The remote version of Waldmeister runs on Geoff Sutcliffe's Miami servers. |
|
41738
eb98c60a6cf0
added experimental "remote_z3_atp", Sutcliffe's TPTP-syntax-aware wrapper for Z3 -- allows to do head-to-head comparison of Sledgehammer's ATP translation and of Sascha's SMT translation
blanchet
parents:
41727
diff
changeset
|
754 |
|
40942 | 755 |
\item[$\bullet$] \textbf{\textit{remote\_z3}:} The remote version of Z3 runs on |
756 |
servers at the TU M\"unchen (or wherever \texttt{REMOTE\_SMT\_URL} is set to |
|
757 |
point). |
|
40073 | 758 |
|
41740
4b09f8b9e012
added "Z3 as an ATP" support to Sledgehammer locally
blanchet
parents:
41738
diff
changeset
|
759 |
\item[$\bullet$] \textbf{\textit{remote\_z3\_atp}:} The remote version of ``Z3 |
4b09f8b9e012
added "Z3 as an ATP" support to Sledgehammer locally
blanchet
parents:
41738
diff
changeset
|
760 |
as an ATP'' runs on Geoff Sutcliffe's Miami servers. |
36926 | 761 |
\end{enum} |
762 |
||
40942 | 763 |
By default, Sledgehammer will run E, SPASS, Vampire, SInE-E, and Z3 (or whatever |
42228 | 764 |
the SMT module's \textit{smt\_solver} configuration option is set to) in |
40073 | 765 |
parallel---either locally or remotely, depending on the number of processor |
766 |
cores available. For historical reasons, the default value of this option can be |
|
767 |
overridden using the option ``Sledgehammer: Provers'' from the ``Isabelle'' menu |
|
768 |
in Proof General. |
|
36926 | 769 |
|
40059
6ad9081665db
use consistent terminology in Sledgehammer: "prover = ATP or SMT solver or ..."
blanchet
parents:
39335
diff
changeset
|
770 |
It is a good idea to run several provers in parallel, although it could slow |
42964
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
771 |
down your machine. Running E, SPASS, and Vampire for 5~seconds yields a similar |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
772 |
success rate to running the most effective of these for 120~seconds |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
773 |
\cite{boehme-nipkow-2010}. |
40059
6ad9081665db
use consistent terminology in Sledgehammer: "prover = ATP or SMT solver or ..."
blanchet
parents:
39335
diff
changeset
|
774 |
|
6ad9081665db
use consistent terminology in Sledgehammer: "prover = ATP or SMT solver or ..."
blanchet
parents:
39335
diff
changeset
|
775 |
\opnodefault{prover}{string} |
6ad9081665db
use consistent terminology in Sledgehammer: "prover = ATP or SMT solver or ..."
blanchet
parents:
39335
diff
changeset
|
776 |
Alias for \textit{provers}. |
6ad9081665db
use consistent terminology in Sledgehammer: "prover = ATP or SMT solver or ..."
blanchet
parents:
39335
diff
changeset
|
777 |
|
42884 | 778 |
%\opnodefault{atps}{string} |
779 |
%Legacy alias for \textit{provers}. |
|
36926 | 780 |
|
42884 | 781 |
%\opnodefault{atp}{string} |
782 |
%Legacy alias for \textit{provers}. |
|
36926 | 783 |
|
40343
4521d56aef63
use floating-point numbers for Sledgehammer's "thresholds" option rather than percentages;
blanchet
parents:
40341
diff
changeset
|
784 |
\opdefault{timeout}{float\_or\_none}{\upshape 30} |
40341
03156257040f
standardize on seconds for Nitpick and Sledgehammer timeouts
blanchet
parents:
40203
diff
changeset
|
785 |
Specifies the maximum number of seconds that the automatic provers should spend |
42850
c8709be8a40f
distinguish between a soft timeout (30 s by defalt) and a hard timeout (60 s), to let minimization-based provers (such as CVC3, Yices, and occasionally the other provers) do their job
blanchet
parents:
42846
diff
changeset
|
786 |
searching for a proof. This excludes problem preparation and is a soft limit. |
c8709be8a40f
distinguish between a soft timeout (30 s by defalt) and a hard timeout (60 s), to let minimization-based provers (such as CVC3, Yices, and occasionally the other provers) do their job
blanchet
parents:
42846
diff
changeset
|
787 |
For historical reasons, the default value of this option can be overridden using |
c8709be8a40f
distinguish between a soft timeout (30 s by defalt) and a hard timeout (60 s), to let minimization-based provers (such as CVC3, Yices, and occasionally the other provers) do their job
blanchet
parents:
42846
diff
changeset
|
788 |
the option ``Sledgehammer: Time Limit'' from the ``Isabelle'' menu in Proof |
c8709be8a40f
distinguish between a soft timeout (30 s by defalt) and a hard timeout (60 s), to let minimization-based provers (such as CVC3, Yices, and occasionally the other provers) do their job
blanchet
parents:
42846
diff
changeset
|
789 |
General. |
38984 | 790 |
|
38983 | 791 |
\opfalse{blocking}{non\_blocking} |
792 |
Specifies whether the \textbf{sledgehammer} command should operate |
|
793 |
synchronously. The asynchronous (non-blocking) mode lets the user start proving |
|
794 |
the putative theorem manually while Sledgehammer looks for a proof, but it can |
|
42995
e23f61546cf0
always run Sledgehammer synchronously in the jEdit interface (until the multithreading support for Proof General is ported)
blanchet
parents:
42964
diff
changeset
|
795 |
also be more confusing. Irrespective of the value of this option, Sledgehammer |
e23f61546cf0
always run Sledgehammer synchronously in the jEdit interface (until the multithreading support for Proof General is ported)
blanchet
parents:
42964
diff
changeset
|
796 |
is always run synchronously for the new jEdit-based user interface or if |
e23f61546cf0
always run Sledgehammer synchronously in the jEdit interface (until the multithreading support for Proof General is ported)
blanchet
parents:
42964
diff
changeset
|
797 |
\textit{debug} (\S\ref{output-format}) is enabled. |
38983 | 798 |
|
42443
724e612ba248
implemented general slicing for ATPs, especially E 1.2w and above
blanchet
parents:
42442
diff
changeset
|
799 |
\optrue{slicing}{no\_slicing} |
724e612ba248
implemented general slicing for ATPs, especially E 1.2w and above
blanchet
parents:
42442
diff
changeset
|
800 |
Specifies whether the time allocated to a prover should be sliced into several |
724e612ba248
implemented general slicing for ATPs, especially E 1.2w and above
blanchet
parents:
42442
diff
changeset
|
801 |
segments, each of which has its own set of possibly prover-dependent options. |
42446 | 802 |
For SPASS and Vampire, the first slice tries the fast but incomplete |
42443
724e612ba248
implemented general slicing for ATPs, especially E 1.2w and above
blanchet
parents:
42442
diff
changeset
|
803 |
set-of-support (SOS) strategy, whereas the second slice runs without it. For E, |
42446 | 804 |
up to three slices are tried, with different weighted search strategies and |
42443
724e612ba248
implemented general slicing for ATPs, especially E 1.2w and above
blanchet
parents:
42442
diff
changeset
|
805 |
number of facts. For SMT solvers, several slices are tried with the same options |
42446 | 806 |
each time but fewer and fewer facts. According to benchmarks with a timeout of |
807 |
30 seconds, slicing is a valuable optimization, and you should probably leave it |
|
808 |
enabled unless you are conducting experiments. This option is implicitly |
|
42443
724e612ba248
implemented general slicing for ATPs, especially E 1.2w and above
blanchet
parents:
42442
diff
changeset
|
809 |
disabled for (short) automatic runs. |
724e612ba248
implemented general slicing for ATPs, especially E 1.2w and above
blanchet
parents:
42442
diff
changeset
|
810 |
|
724e612ba248
implemented general slicing for ATPs, especially E 1.2w and above
blanchet
parents:
42442
diff
changeset
|
811 |
\nopagebreak |
724e612ba248
implemented general slicing for ATPs, especially E 1.2w and above
blanchet
parents:
42442
diff
changeset
|
812 |
{\small See also \textit{verbose} (\S\ref{output-format}).} |
724e612ba248
implemented general slicing for ATPs, especially E 1.2w and above
blanchet
parents:
42442
diff
changeset
|
813 |
|
36926 | 814 |
\opfalse{overlord}{no\_overlord} |
815 |
Specifies whether Sledgehammer should put its temporary files in |
|
816 |
\texttt{\$ISA\-BELLE\_\allowbreak HOME\_\allowbreak USER}, which is useful for |
|
817 |
debugging Sledgehammer but also unsafe if several instances of the tool are run |
|
818 |
simultaneously. The files are identified by the prefix \texttt{prob\_}; you may |
|
819 |
safely remove them after Sledgehammer has run. |
|
820 |
||
821 |
\nopagebreak |
|
822 |
{\small See also \textit{debug} (\S\ref{output-format}).} |
|
823 |
\end{enum} |
|
824 |
||
825 |
\subsection{Problem Encoding} |
|
826 |
\label{problem-encoding} |
|
827 |
||
828 |
\begin{enum} |
|
829 |
\opfalse{explicit\_apply}{implicit\_apply} |
|
830 |
Specifies whether function application should be encoded as an explicit |
|
40073 | 831 |
``apply'' operator in ATP problems. If the option is set to \textit{false}, each |
832 |
function will be directly applied to as many arguments as possible. Enabling |
|
833 |
this option can sometimes help discover higher-order proofs that otherwise would |
|
834 |
not be found. |
|
36926 | 835 |
|
836 |
\opfalse{full\_types}{partial\_types} |
|
42681 | 837 |
Specifies whether full type information is encoded in ATP problems. Enabling |
42736
8005fc9b65ec
ensure that Auto Sledgehammer is run with full type information
blanchet
parents:
42724
diff
changeset
|
838 |
this option prevents the discovery of type-incorrect proofs, but it can slow |
8005fc9b65ec
ensure that Auto Sledgehammer is run with full type information
blanchet
parents:
42724
diff
changeset
|
839 |
down the ATP slightly. This option is implicitly enabled for automatic runs. For |
8005fc9b65ec
ensure that Auto Sledgehammer is run with full type information
blanchet
parents:
42724
diff
changeset
|
840 |
historical reasons, the default value of this option can be overridden using the |
8005fc9b65ec
ensure that Auto Sledgehammer is run with full type information
blanchet
parents:
42724
diff
changeset
|
841 |
option ``Sledgehammer: Full Types'' from the ``Isabelle'' menu in Proof General. |
42228 | 842 |
|
843 |
\opdefault{type\_sys}{string}{smart} |
|
42887
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
844 |
Specifies the type system to use in ATP problems. Some of the type systems are |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
845 |
unsound, meaning that they can give rise to spurious proofs (unreconstructible |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
846 |
using Metis). The supported type systems are listed below, with an indication of |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
847 |
their soundness in parentheses: |
42228 | 848 |
|
849 |
\begin{enum} |
|
42887
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
850 |
\item[$\bullet$] \textbf{\textit{erased} (very unsound):} No type information is |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
851 |
supplied to the ATP. Types are simply erased. |
42582 | 852 |
|
42887
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
853 |
\item[$\bullet$] \textbf{\textit{poly\_preds} (sound):} Types are encoded using |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
854 |
a predicate \textit{has\_\allowbreak type\/}$(\tau, t)$ that restricts the range |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
855 |
of bound variables. Constants are annotated with their types, supplied as extra |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
856 |
arguments, to resolve overloading. |
42685 | 857 |
|
42887
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
858 |
\item[$\bullet$] \textbf{\textit{poly\_tags} (sound):} Each term and subterm is |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
859 |
tagged with its type using a function $\mathit{type\_info\/}(\tau, t)$. |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
860 |
|
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
861 |
\item[$\bullet$] \textbf{\textit{poly\_args} (unsound):} |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
862 |
Like for \textit{poly\_preds} constants are annotated with their types to |
42722 | 863 |
resolve overloading, but otherwise no type information is encoded. |
42685 | 864 |
|
42722 | 865 |
\item[$\bullet$] |
866 |
\textbf{% |
|
42887
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
867 |
\textit{mono\_preds}, \textit{mono\_tags} (sound); |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
868 |
\textit{mono\_args} (unsound):} \\ |
42722 | 869 |
Similar to \textit{poly\_preds}, \textit{poly\_tags}, and \textit{poly\_args}, |
870 |
respectively, but the problem is additionally monomorphized, meaning that type |
|
871 |
variables are instantiated with heuristically chosen ground types. |
|
872 |
Monomorphization can simplify reasoning but also leads to larger fact bases, |
|
873 |
which can slow down the ATPs. |
|
42582 | 874 |
|
42722 | 875 |
\item[$\bullet$] |
876 |
\textbf{% |
|
877 |
\textit{mangled\_preds}, |
|
42887
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
878 |
\textit{mangled\_tags} (sound); \\ |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
879 |
\textit{mangled\_args} (unsound):} \\ |
42722 | 880 |
Similar to |
881 |
\textit{mono\_preds}, \textit{mono\_tags}, and \textit{mono\_args}, |
|
882 |
respectively but types are mangled in constant names instead of being supplied |
|
883 |
as ground term arguments. The binary predicate $\mathit{has\_type\/}(\tau, t)$ |
|
884 |
becomes a unary predicate $\mathit{has\_type\_}\tau(t)$, and the binary function |
|
42589
9f7c48463645
restructured type systems some more -- the old naming schemes had "argshg diff |less" and "tagshg diff |less" as equivalent and didn't support a monomorphic version of "tags"
blanchet
parents:
42582
diff
changeset
|
885 |
$\mathit{type\_info\/}(\tau, t)$ becomes a unary function |
9f7c48463645
restructured type systems some more -- the old naming schemes had "argshg diff |less" and "tagshg diff |less" as equivalent and didn't support a monomorphic version of "tags"
blanchet
parents:
42582
diff
changeset
|
886 |
$\mathit{type\_info\_}\tau(t)$. |
9f7c48463645
restructured type systems some more -- the old naming schemes had "argshg diff |less" and "tagshg diff |less" as equivalent and didn't support a monomorphic version of "tags"
blanchet
parents:
42582
diff
changeset
|
887 |
|
42887
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
888 |
\item[$\bullet$] \textbf{\textit{simple} (sound):} Use the prover's support for |
42964
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
889 |
simple types if available; otherwise, fall back on \textit{mangled\_preds}. The |
bf45fd2488a2
document primitive support for LEO-II and Satallax
blanchet
parents:
42945
diff
changeset
|
890 |
problem is monomorphized. |
42681 | 891 |
|
892 |
\item[$\bullet$] |
|
893 |
\textbf{% |
|
42887
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
894 |
\textit{poly\_preds}?, \textit{poly\_tags}?, \textit{mono\_preds}?, \textit{mono\_tags}?, \\ |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
895 |
\textit{mangled\_preds}?, \textit{mangled\_tags}?, \textit{simple}? (quasi-sound):} \\ |
42743
b81127eb79f3
reflect option renaming in doc + do not document the type systems poly_preds? and poly_tags?, since they are virtually identical to the non-? versions
blanchet
parents:
42736
diff
changeset
|
896 |
The type systems \textit{poly\_preds}, \textit{poly\_tags}, |
42887
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
897 |
\textit{mono\_preds}, \textit{mono\_tags}, \textit{mangled\_preds}, |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
898 |
\textit{mangled\_tags}, and \textit{simple} are fully typed and sound. For each |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
899 |
of these, Sledgehammer also provides a lighter, virtually sound variant |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
900 |
identified by a question mark (`{?}')\ that detects and erases monotonic types, |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
901 |
notably infinite types. (For \textit{simple}, the types are not actually erased |
42856 | 902 |
but rather replaced by a shared uniform type of individuals.) |
42582 | 903 |
|
42887
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
904 |
\item[$\bullet$] |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
905 |
\textbf{% |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
906 |
\textit{poly\_preds}!, \textit{poly\_tags}!, \textit{mono\_preds}!, \textit{mono\_tags}!, \\ |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
907 |
\textit{mangled\_preds}!, \textit{mangled\_tags}!, \textit{simple}! \\ |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
908 |
(mildly unsound):} \\ |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
909 |
The type systems \textit{poly\_preds}, \textit{poly\_tags}, |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
910 |
\textit{mono\_preds}, \textit{mono\_tags}, \textit{mangled\_preds}, |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
911 |
\textit{mangled\_tags}, and \textit{simple} also admit a mildly unsound (but |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
912 |
very efficient) variant identified by an exclamation mark (`{!}') that detects |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
913 |
and erases erases all types except those that are clearly finite (e.g., |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
914 |
\textit{bool}). (For \textit{simple}, the types are not actually erased but |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
915 |
rather replaced by a shared uniform type of individuals.) |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
916 |
|
42237 | 917 |
\item[$\bullet$] \textbf{\textit{smart}:} If \textit{full\_types} is enabled, |
42887
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
918 |
uses a sound or virtually sound encoding; otherwise, uses any encoding. The actual |
771be1dcfef6
document new type system and soundness properties of the different systems
blanchet
parents:
42884
diff
changeset
|
919 |
encoding used depends on the ATP and should be the most efficient for that ATP. |
42228 | 920 |
\end{enum} |
921 |
||
42856 | 922 |
In addition, all the \textit{preds} and \textit{tags} type systems are available |
923 |
in two variants, a lightweight and a heavyweight variant. The lightweight |
|
924 |
variants are generally more efficient and are the default; the heavyweight |
|
925 |
variants are identified by a \textit{\_heavy} suffix (e.g., |
|
926 |
\textit{mangled\_preds\_heavy}{?}). |
|
42523
08346ea46a59
added (without implementation yet) new type encodings for Sledgehammer/ATP
blanchet
parents:
42511
diff
changeset
|
927 |
|
42856 | 928 |
For SMT solvers and ToFoF-E, the type system is always \textit{simple}, |
929 |
irrespective of the value of this option. |
|
42888 | 930 |
|
931 |
\nopagebreak |
|
932 |
{\small See also \textit{max\_new\_mono\_instances} (\S\ref{relevance-filter}) |
|
933 |
and \textit{max\_mono\_iters} (\S\ref{relevance-filter}).} |
|
38591 | 934 |
\end{enum} |
36926 | 935 |
|
38591 | 936 |
\subsection{Relevance Filter} |
937 |
\label{relevance-filter} |
|
938 |
||
939 |
\begin{enum} |
|
40343
4521d56aef63
use floating-point numbers for Sledgehammer's "thresholds" option rather than percentages;
blanchet
parents:
40341
diff
changeset
|
940 |
\opdefault{relevance\_thresholds}{float\_pair}{\upshape 0.45~0.85} |
38746 | 941 |
Specifies the thresholds above which facts are considered relevant by the |
942 |
relevance filter. The first threshold is used for the first iteration of the |
|
943 |
relevance filter and the second threshold is used for the last iteration (if it |
|
944 |
is reached). The effective threshold is quadratically interpolated for the other |
|
40343
4521d56aef63
use floating-point numbers for Sledgehammer's "thresholds" option rather than percentages;
blanchet
parents:
40341
diff
changeset
|
945 |
iterations. Each threshold ranges from 0 to 1, where 0 means that all theorems |
4521d56aef63
use floating-point numbers for Sledgehammer's "thresholds" option rather than percentages;
blanchet
parents:
40341
diff
changeset
|
946 |
are relevant and 1 only theorems that refer to previously seen constants. |
36926 | 947 |
|
40343
4521d56aef63
use floating-point numbers for Sledgehammer's "thresholds" option rather than percentages;
blanchet
parents:
40341
diff
changeset
|
948 |
\opsmart{max\_relevant}{int\_or\_smart} |
38746 | 949 |
Specifies the maximum number of facts that may be returned by the relevance |
950 |
filter. If the option is set to \textit{smart}, it is set to a value that was |
|
40059
6ad9081665db
use consistent terminology in Sledgehammer: "prover = ATP or SMT solver or ..."
blanchet
parents:
39335
diff
changeset
|
951 |
empirically found to be appropriate for the prover. A typical value would be |
6ad9081665db
use consistent terminology in Sledgehammer: "prover = ATP or SMT solver or ..."
blanchet
parents:
39335
diff
changeset
|
952 |
300. |
42180
a6c141925a8a
added monomorphization option to Sledgehammer ATPs -- this looks promising but is still off by default
blanchet
parents:
41747
diff
changeset
|
953 |
|
42884 | 954 |
\opdefault{max\_new\_mono\_instances}{int}{\upshape 400} |
955 |
Specifies the maximum number of monomorphic instances to generate beyond |
|
956 |
\textit{max\_relevant}. The higher this limit is, the more monomorphic instances |
|
957 |
are potentially generated. Whether monomorphization takes place depends on the |
|
958 |
type system used. |
|
959 |
||
960 |
\nopagebreak |
|
961 |
{\small See also \textit{type\_sys} (\S\ref{problem-encoding}).} |
|
962 |
||
963 |
\opdefault{max\_mono\_iters}{int}{\upshape 3} |
|
964 |
Specifies the maximum number of iterations for the monomorphization fixpoint |
|
965 |
construction. The higher this limit is, the more monomorphic instances are |
|
966 |
potentially generated. Whether monomorphization takes place depends on the |
|
967 |
type system used. |
|
968 |
||
969 |
\nopagebreak |
|
970 |
{\small See also \textit{type\_sys} (\S\ref{problem-encoding}).} |
|
36926 | 971 |
\end{enum} |
972 |
||
973 |
\subsection{Output Format} |
|
974 |
\label{output-format} |
|
975 |
||
976 |
\begin{enum} |
|
977 |
||
978 |
\opfalse{verbose}{quiet} |
|
979 |
Specifies whether the \textbf{sledgehammer} command should explain what it does. |
|
41208
1b28c43a7074
make "debug" imply "blocking", since in blocking mode the exceptions flow through and are more instructive
blanchet
parents:
40942
diff
changeset
|
980 |
This option is implicitly disabled for automatic runs. |
36926 | 981 |
|
982 |
\opfalse{debug}{no\_debug} |
|
40203 | 983 |
Specifies whether Sledgehammer should display additional debugging information |
984 |
beyond what \textit{verbose} already displays. Enabling \textit{debug} also |
|
41208
1b28c43a7074
make "debug" imply "blocking", since in blocking mode the exceptions flow through and are more instructive
blanchet
parents:
40942
diff
changeset
|
985 |
enables \textit{verbose} and \textit{blocking} (\S\ref{mode-of-operation}) |
1b28c43a7074
make "debug" imply "blocking", since in blocking mode the exceptions flow through and are more instructive
blanchet
parents:
40942
diff
changeset
|
986 |
behind the scenes. The \textit{debug} option is implicitly disabled for |
1b28c43a7074
make "debug" imply "blocking", since in blocking mode the exceptions flow through and are more instructive
blanchet
parents:
40942
diff
changeset
|
987 |
automatic runs. |
36926 | 988 |
|
989 |
\nopagebreak |
|
990 |
{\small See also \textit{overlord} (\S\ref{mode-of-operation}).} |
|
991 |
||
992 |
\opfalse{isar\_proof}{no\_isar\_proof} |
|
993 |
Specifies whether Isar proofs should be output in addition to one-liner |
|
994 |
\textit{metis} proofs. Isar proof construction is still experimental and often |
|
995 |
fails; however, they are usually faster and sometimes more robust than |
|
996 |
\textit{metis} proofs. |
|
997 |
||
40343
4521d56aef63
use floating-point numbers for Sledgehammer's "thresholds" option rather than percentages;
blanchet
parents:
40341
diff
changeset
|
998 |
\opdefault{isar\_shrink\_factor}{int}{\upshape 1} |
36926 | 999 |
Specifies the granularity of the Isar proof. A value of $n$ indicates that each |
1000 |
Isar proof step should correspond to a group of up to $n$ consecutive proof |
|
1001 |
steps in the ATP proof. |
|
1002 |
||
1003 |
\end{enum} |
|
1004 |
||
38984 | 1005 |
\subsection{Authentication} |
1006 |
\label{authentication} |
|
1007 |
||
1008 |
\begin{enum} |
|
1009 |
\opnodefault{expect}{string} |
|
1010 |
Specifies the expected outcome, which must be one of the following: |
|
36926 | 1011 |
|
1012 |
\begin{enum} |
|
40203 | 1013 |
\item[$\bullet$] \textbf{\textit{some}:} Sledgehammer found a (potentially |
1014 |
unsound) proof. |
|
38984 | 1015 |
\item[$\bullet$] \textbf{\textit{none}:} Sledgehammer found no proof. |
40203 | 1016 |
\item[$\bullet$] \textbf{\textit{unknown}:} Sledgehammer encountered some |
1017 |
problem. |
|
38984 | 1018 |
\end{enum} |
1019 |
||
1020 |
Sledgehammer emits an error (if \textit{blocking} is enabled) or a warning |
|
1021 |
(otherwise) if the actual outcome differs from the expected outcome. This option |
|
1022 |
is useful for regression testing. |
|
1023 |
||
1024 |
\nopagebreak |
|
1025 |
{\small See also \textit{blocking} (\S\ref{mode-of-operation}).} |
|
36926 | 1026 |
\end{enum} |
1027 |
||
1028 |
\let\em=\sl |
|
1029 |
\bibliography{../manual}{} |
|
1030 |
\bibliographystyle{abbrv} |
|
1031 |
||
1032 |
\end{document} |