doc-src/Sledgehammer/sledgehammer.tex
changeset 38043 f31ddd5da4e3
parent 37582 f329e1b99ce6
child 38063 458c4578761f
equal deleted inserted replaced
38042:ef45bcccc9fd 38043:f31ddd5da4e3
   119 relies on third-party automatic theorem provers (ATPs). Currently, E, SPASS, and
   119 relies on third-party automatic theorem provers (ATPs). Currently, E, SPASS, and
   120 Vampire are supported. All of these are available remotely via SystemOnTPTP
   120 Vampire are supported. All of these are available remotely via SystemOnTPTP
   121 \cite{sutcliffe-2000}, but if you want better performance you will need to
   121 \cite{sutcliffe-2000}, but if you want better performance you will need to
   122 install at least E and SPASS locally.
   122 install at least E and SPASS locally.
   123 
   123 
   124 There are three main ways to install E and SPASS:
   124 There are three main ways to install ATPs on your machine:
   125 
   125 
   126 \begin{enum}
   126 \begin{enum}
   127 \item[$\bullet$] If you installed an official Isabelle package with everything
   127 \item[$\bullet$] If you installed an official Isabelle package with everything
   128 inside, it should already include properly setup executables for E and SPASS,
   128 inside, it should already include properly setup executables for E and SPASS,
   129 ready to use.
   129 ready to use.%
   130 
   130 \footnote{Vampire's license prevents us from doing the same for this otherwise
   131 \item[$\bullet$] Otherwise, you can download the Isabelle-aware E and SPASS
   131 wonderful tool.}
       
   132 
       
   133 \item[$\bullet$] Alternatively, you can download the Isabelle-aware E and SPASS
   132 binary packages from Isabelle's download page. Extract the archives, then add a
   134 binary packages from Isabelle's download page. Extract the archives, then add a
   133 line to your \texttt{\char`\~/.isabelle/etc/components} file with the absolute path to
   135 line to your \texttt{\char`\~/.isabelle/etc/components} file with the absolute path to
   134 E or SPASS. For example, if \texttt{\char`\~/.isabelle/etc/components} does not exist
   136 E or SPASS. For example, if the \texttt{components} does not exist
   135 yet and you extracted SPASS to \texttt{/usr/local/spass-3.7}, create
   137 yet and you extracted SPASS to \texttt{/usr/local/spass-3.7}, create
   136 the file \texttt{\char`\~/.isabelle/etc/components} with the single line
   138 the \texttt{components} file with the single line
   137 
   139 
   138 \prew
   140 \prew
   139 \texttt{/usr/local/spass-3.7}
   141 \texttt{/usr/local/spass-3.7}
   140 \postw
   142 \postw
   141 
   143 
   142 \item[$\bullet$] If you prefer to build E or SPASS yourself, feel free to do so
   144 in it.
   143 and set the environment variable \texttt{E\_HOME} or \texttt{SPASS\_HOME} to the
   145 
   144 directory that contains the \texttt{eproof} or \texttt{SPASS} executable,
   146 \item[$\bullet$] If you prefer to build E or SPASS yourself, or obtained a
   145 respectively.
   147 Vampire executable from somewhere (e.g., \url{http://www.vprover.org/}),
       
   148 set the environment variable \texttt{E\_HOME}, \texttt{SPASS\_HOME}, or
       
   149 \texttt{VAMPIRE\_HOME} to the directory that contains the \texttt{eproof},
       
   150 \texttt{SPASS}, or \texttt{vampire} executable.
   146 \end{enum}
   151 \end{enum}
   147 
   152 
   148 To check whether E and SPASS are installed, follow the example in
   153 To check whether E and SPASS are installed, follow the example in
   149 \S\ref{first-steps}.
   154 \S\ref{first-steps}.
   150 
   155 
   174 \prew
   179 \prew
   175 \slshape
   180 \slshape
   176 Sledgehammer: ATP ``\textit{e}'' for subgoal 1: \\
   181 Sledgehammer: ATP ``\textit{e}'' for subgoal 1: \\
   177 $([a] = [b]) = (a = b)$ \\
   182 $([a] = [b]) = (a = b)$ \\
   178 Try this command: \textbf{by} (\textit{metis hd.simps}). \\
   183 Try this command: \textbf{by} (\textit{metis hd.simps}). \\
   179 To minimize the number of lemmas, try this command: \\
   184 To minimize the number of lemmas, try this: \\
   180 \textbf{sledgehammer} \textit{minimize} [\textit{atp} = \textit{e}] (\textit{hd.simps}). \\[3\smallskipamount]
   185 \textbf{sledgehammer} \textit{minimize} [\textit{atp} = \textit{e}] (\textit{hd.simps}). \\[3\smallskipamount]
   181 %
   186 %
   182 Sledgehammer: ATP ``\textit{spass}'' for subgoal 1: \\
   187 Sledgehammer: ATP ``\textit{spass}'' for subgoal 1: \\
   183 $([a] = [b]) = (a = b)$ \\
   188 $([a] = [b]) = (a = b)$ \\
   184 Try this command: \textbf{by} (\textit{metis insert\_Nil last\_ConsL}). \\
   189 Try this command: \textbf{by} (\textit{metis insert\_Nil last\_ConsL}). \\
   185 To minimize the number of lemmas, try this command: \\
   190 To minimize the number of lemmas, try this: \\
   186 \textbf{sledgehammer} \textit{minimize} [\textit{atp} = \textit{spass}] (\textit{insert\_Nil last\_ConsL}). \\[3\smallskipamount]
   191 \textbf{sledgehammer} \textit{minimize} [\textit{atp} = \textit{spass}] (\textit{insert\_Nil last\_ConsL}). \\[3\smallskipamount]
   187 %
   192 %
   188 Sledgehammer: ATP ``\textit{remote\_vampire}'' for subgoal 1: \\
   193 Sledgehammer: ATP ``\textit{remote\_vampire}'' for subgoal 1: \\
   189 $([a] = [b]) = (a = b)$ \\
   194 $([a] = [b]) = (a = b)$ \\
   190 Try this command: \textbf{by} (\textit{metis One\_nat\_def\_raw empty\_replicate} \\
   195 Try this command: \textbf{by} (\textit{metis One\_nat\_def\_raw empty\_replicate} \\
   191 \phantom{Try this command: \textbf{by} (\textit{metis~}}\textit{insert\_Nil last\_ConsL replicate\_Suc}). \\
   196 \phantom{Try this command: \textbf{by} (\textit{metis~}}\textit{insert\_Nil last\_ConsL replicate\_Suc}). \\
   192 To minimize the number of lemmas, try this command: \\
   197 To minimize the number of lemmas, try this: \\
   193 \textbf{sledgehammer} \textit{minimize} [\textit{atp} = \textit{remote\_vampire}] \\
   198 \textbf{sledgehammer} \textit{minimize} [\textit{atp} = \textit{remote\_vampire}] \\
   194 \phantom{\textbf{sledgehammer}~}(\textit{One\_nat\_def\_raw empty\_replicate insert\_Nil} \\
   199 \phantom{\textbf{sledgehammer}~}(\textit{One\_nat\_def\_raw empty\_replicate insert\_Nil} \\
   195 \phantom{\textbf{sledgehammer}~(}\textit{last\_ConsL replicate\_Suc}).
   200 \phantom{\textbf{sledgehammer}~(}\textit{last\_ConsL replicate\_Suc}).
   196 \postw
   201 \postw
   197 
   202 
   198 Sledgehammer ran E, SPASS, and the remote version of Vampire in parallel. If E
   203 Sledgehammer ran E, SPASS, and the remote version of Vampire in parallel. If E
   199 and SPASS are not installed (\S\ref{installation}), you will see references to
   204 is not installed (\S\ref{installation}), you will see references to
   200 their remote American cousins \textit{remote\_e} and \textit{remote\_spass}
   205 its remote American cousin \textit{remote\_e} instead of
   201 instead of \textit{e} and \textit{spass}.
   206 \textit{e}; and if SPASS is not installed, it will not appear in the output.
   202 
   207 
   203 Based on each ATP proof, Sledgehammer gives a one-liner proof that uses the
   208 Based on each ATP proof, Sledgehammer gives a one-liner proof that uses the
   204 \textit{metis} method. You can click them and insert them into the theory text.
   209 \textit{metis} method. You can click them and insert them into the theory text.
   205 You can click the ``\textbf{sledgehammer} \textit{minimize}'' command if you
   210 You can click the ``\textbf{sledgehammer} \textit{minimize}'' command if you
   206 want to look for a shorter (and faster) proof. But here the proof found by E
   211 want to look for a shorter (and faster) proof. But here the proof found by E
   375 that contains the \texttt{vampire} executable.
   380 that contains the \texttt{vampire} executable.
   376 
   381 
   377 \item[$\bullet$] \textbf{\textit{remote\_e}:} The remote version of E executes
   382 \item[$\bullet$] \textbf{\textit{remote\_e}:} The remote version of E executes
   378 on Geoff Sutcliffe's Miami servers \cite{sutcliffe-2000}.
   383 on Geoff Sutcliffe's Miami servers \cite{sutcliffe-2000}.
   379 
   384 
   380 \item[$\bullet$] \textbf{\textit{remote\_spass}:} The remote version of SPASS
       
   381 executes on Geoff Sutcliffe's Miami servers.
       
   382 
       
   383 \item[$\bullet$] \textbf{\textit{remote\_vampire}:} The remote version of
   385 \item[$\bullet$] \textbf{\textit{remote\_vampire}:} The remote version of
   384 Vampire executes on Geoff Sutcliffe's Miami servers. Version 9 is used.
   386 Vampire executes on Geoff Sutcliffe's Miami servers. Version 9 is used.
   385 
   387 
   386 \end{enum}
   388 \end{enum}
   387 
   389