Undo back up to longest initial segment containing only calls of certain symbols, including defpkg and include-book.
The following example explains how
(include-book "kestrel/utilities/ubi" :dir :system) (local (include-book "kestrel/utilities/system/world-queries" :dir :system)) (defpkg "FOO" nil) (include-book "kestrel/std/system/defun-sk-queries" :dir :system)) (defun f (x) x) (include-book "arithmetic/top" :dir :system) (defun g (x) x)
We can use
ACL2 !>:pbt 0 0 (EXIT-BOOT-STRAP-MODE) d 1 (INCLUDE-BOOK "kestrel/utilities/ubi" :DIR ...) d 2 (LOCAL (INCLUDE-BOOK "kestrel/utilities/system/world-queries" :DIR ...)) 3 (DEFPKG "FOO" NIL) d 4 (INCLUDE-BOOK "kestrel/std/system/defun-sk-queries" :DIR ...) L 5 (DEFUN F (X) ...) d 6 (INCLUDE-BOOK "arithmetic/top" :DIR ...) L 7:x(DEFUN G (X) ...) ACL2 !>
The
So to continue the example above:
ACL2 !>:ubi d 4:x(INCLUDE-BOOK "kestrel/std/system/defun-sk-queries" :DIR ...) ACL2 !>:pbt 0 0 (EXIT-BOOT-STRAP-MODE) d 1 (INCLUDE-BOOK "kestrel/utilities/ubi" :DIR ...) d 2 (LOCAL (INCLUDE-BOOK "kestrel/utilities/system/world-queries" :DIR ...)) 3 (DEFPKG "FOO" NIL) d 4:x(INCLUDE-BOOK "kestrel/std/system/defun-sk-queries" :DIR ...) ACL2 !>
Note that when successful,
ACL2 !>:ubi There is nothing to undo, since all commands after the boot-strap are DEFUN, DEFPKG, INCLUDE-BOOK, XDOC, ADD-INCLUDE-BOOK-DIR or ADD-INCLUDE-BOOK-DIR! commands. ACL2 !>
Note that
(defun f (x) x) (reset-prehistory) (include-book "arithmetic/top" :dir :system) (defun g (x) x)
Here is a subsequent log. Notice that
ACL2 !>:pbt 0 0 (RESET-PREHISTORY) d 1 (INCLUDE-BOOK "arithmetic/top" :DIR ...) L 2:x(DEFUN G (X) ...) ACL2 !>:ubi d 1:x(INCLUDE-BOOK "arithmetic/top" :DIR ...) ACL2 !>
Finally, note that
ACL2 !>:pbt 0 0 (EXIT-BOOT-STRAP-MODE) d 1 (INCLUDE-BOOK "kestrel/utilities/ubi" :DIR ...) d 2 (LOCAL (INCLUDE-BOOK "kestrel/utilities/system/world-queries" :DIR ...)) 3 (DEFPKG "FOO" NIL) d 4 (INCLUDE-BOOK "kestrel/std/system/defun-sk-queries" :DIR ...) L 5 (DEFUN F (X) ...) d 6 (INCLUDE-BOOK "arithmetic/top" :DIR ...) L 7:x(DEFUN G (X) ...) ACL2 !>
Our first example above showed that submitting