doc-src/IsarRef/Thy/Misc.thy
changeset 27598 b66e257b75f5
parent 27056 4bf8710b3242
child 28760 cbc435f7b16b
equal deleted inserted replaced
27597:beb9b5f07dbc 27598:b66e257b75f5
   189 section {* History commands \label{sec:history} *}
   189 section {* History commands \label{sec:history} *}
   190 
   190 
   191 text {*
   191 text {*
   192   \begin{matharray}{rcl}
   192   \begin{matharray}{rcl}
   193     @{command_def "undo"}^{{ * }{ * }} & : & \isarkeep{\cdot} \\
   193     @{command_def "undo"}^{{ * }{ * }} & : & \isarkeep{\cdot} \\
   194     @{command_def "redo"}^{{ * }{ * }} & : & \isarkeep{\cdot} \\
   194     @{command_def "linear_undo"}^{{ * }{ * }} & : & \isarkeep{\cdot} \\
   195     @{command_def "kill"}^{{ * }{ * }} & : & \isarkeep{\cdot} \\
   195     @{command_def "kill"}^{{ * }{ * }} & : & \isarkeep{\cdot} \\
   196   \end{matharray}
   196   \end{matharray}
   197 
   197 
   198   The Isabelle/Isar top-level maintains a two-stage history, for
   198   The Isabelle/Isar top-level maintains a two-stage history, for
   199   theory and proof state transformation.  Basically, any command can
   199   theory and proof state transformation.  Basically, any command can
   200   be undone using @{command "undo"}, excluding mere diagnostic
   200   be undone using @{command "undo"}, excluding mere diagnostic
   201   elements.  Its effect may be revoked via @{command "redo"}, unless
   201   elements.  Note that a theorem statement with a \emph{finished}
   202   the corresponding @{command "undo"} step has crossed the beginning
   202   proof is treated as a single unit by @{command "undo"}.  In
   203   of a proof or theory.  The @{command "kill"} command aborts the
   203   contrast, the variant @{command "linear_undo"} admits to step back
   204   current history node altogether, discontinuing a proof or even the
   204   into the middle of a proof.  The @{command "kill"} command aborts
   205   whole theory.  This operation is \emph{not} undo-able.
   205   the current history node altogether, discontinuing a proof or even
       
   206   the whole theory.  This operation is \emph{not} undo-able.
   206 
   207 
   207   \begin{warn}
   208   \begin{warn}
   208     History commands should never be used with user interfaces such as
   209     History commands should never be used with user interfaces such as
   209     Proof~General \cite{proofgeneral,Aspinall:TACAS:2000}, which takes
   210     Proof~General \cite{proofgeneral,Aspinall:TACAS:2000}, which takes
   210     care of stepping forth and back itself.  Interfering by manual
   211     care of stepping forth and back itself.  Interfering by manual
   211     @{command "undo"}, @{command "redo"}, or even @{command "kill"}
   212     @{command "undo"}, @{command "linear_undo"}, or even @{command
   212     commands would quickly result in utter confusion.
   213     "kill"} commands would quickly result in utter confusion.
   213   \end{warn}
   214   \end{warn}
   214 *}
   215 *}
   215 
   216 
   216 
   217 
   217 section {* System commands *}
   218 section {* System commands *}