• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
      • Io
        • Fmt
        • Msg
        • Cw
        • Set-evisc-tuple
        • Set-iprint
        • Print-control
        • Read-file-into-string
        • Msgp
        • Std/io
        • Printing-to-strings
        • Evisc-tuple
          • Brr-evisc-tuple
        • Output-controls
        • Observation
        • *standard-co*
        • Pp-special-syms
        • Standard-oi
        • Without-evisc
        • Standard-co
        • Serialize
        • Output-to-file
        • Fmt-to-comment-window
        • Character-encoding
        • Princ$
        • Open-output-channel!
        • Cw-print-base-radix
        • Set-print-case
        • Set-print-base
        • Print-object$
        • Fmx-cw
        • Print-object$+
        • Set-print-radix
        • Extend-pathname
        • Set-fmt-hard-right-margin
        • Proofs-co
        • File-write-date$
        • Set-print-base-radix
        • Print-base-p
        • *standard-oi*
        • Wof
        • File-length$
        • Fms!-lst
        • *standard-ci*
        • Write-list
        • Fmt!
        • Fms
        • Delete-file$
        • Cw!
        • Fmt-to-comment-window!
        • Fms!
        • Eviscerate-hide-terms
        • Fmt1!
        • Fmt-to-comment-window!+
        • Read-file-into-byte-array-stobj
        • Fmt1
        • Fmt-to-comment-window+
        • Cw-print-base-radix!
        • Read-file-into-character-array-stobj
        • Cw!+
        • Newline
        • Fmx
        • Cw+
        • Read-object-from-file
        • Set-fmt-soft-right-margin
        • Read-objects-from-file
        • Read-file-into-byte-list
        • Read-file-into-character-list
      • Defttag
      • Sys-call
      • Save-exec
      • Quicklisp
      • Oslib
      • Std/io
      • Bridge
      • Clex
      • Tshell
      • Unsound-eval
      • Hacker
      • Startup-banner
      • Command-line
    • Hardware-verification
    • Software-verification
    • Testing-utilities
    • Math
  • Io

Evisc-tuple

Control suppression of details when printing

ACL2 output is generally printed in full. However, ACL2 can be directed to abbreviate, or ``eviscerate'', objects before printing them. To ``eviscerate'' an object we replace certain substructures within it by strings that are printed in their stead. Such replacement is made relative to a so-called ``evisc-tuple'', which has four components: (evisc-tuple print-level print-length alist hiding-cars) is the same as the value of (list alist print-level print-length hiding-cars), and the components are used as follows (with priority order as discussed below). The alist component is used to replace any substructure occurring as a key by the corresponding string. The print-level and print-length are analogous to Common Lisp variables *print-level* and *print-length*, respectively, and cause replacement of substructures deeper than print-level by `#' and those longer than print-length by `...'. Finally, any consp x that starts with one of the symbols in hiding-cars is printed as <hidden>.

The following example illustrates the use of an evisc-tuple that limits the print-level to 3 — only three descents into list structures are permitted before replacing a subexpression by `#' — and limits the print-length to 4 — only the first four elements of any list structure will be printed before replacing its tail by `...'.

ACL2 !>(fms "~x0~%"
            (list (cons #\0 '((a b ((c d)) e f g) u v w x y)))
            *standard-co*
            state
            (evisc-tuple 3 4 nil nil))

((A B (#) E ...) U V W ...)
<state>
ACL2 !>

Notice that it is impossible to read the printed value back into ACL2, since there is no way for the ACL2 reader to interpret `#' or `...'. To solve this problem, see set-iprint.

In the above example we pass an evisc-tuple explicitly to a printing function, in this case, fms (see fmt). But ACL2 also does its own printing, for example during a proof attempt. There are global evisc-tuples that control ACL2's printing; see set-evisc-tuple and see without-evisc.

Subtopics

Brr-evisc-tuple
Determines partial suppression of output from brr-commands