• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
      • Std/lists
      • Std/alists
      • Obags
      • Std/util
      • Std/strings
        • Pretty-printing
          • Pretty-printing-implementation
            • Missing-functionality
            • Printconfig
            • Cons-ppr1
            • Print-escaped-charlist
            • Atom-size
            • Print-escaped-str
            • Obj-size
            • Maybe-merge-flat
            • Ppr
            • Printer-instructions
            • Keyword-param-valuep
            • Print-flat-objs
              • Radix-print-int
              • Print-escaped-atom
              • Print-atom
              • Print-escaped-symbol
              • Radix-print-complex
              • Basic-print-complex
              • Radix-print-rat
              • Spaces1
              • Basic-print-rat
              • Basic-print-nat
              • Basic-print-int
              • Spaces
              • My-needs-slashes
              • Pinstlist->max-width
              • Nat-size
              • Special-term-num
              • Print-column
              • Print-base-fix
              • Int-size
              • Keyword-fix
              • Print-instruction
              • Pinst->width
              • In-home-package-p
              • Eviscerated->guts
              • Evisceratedp
              • Pprdot
            • Eviscerate
            • Pretty
            • Revappend-pretty
            • Pretty-list
          • Printtree
          • Base64
          • Charset-p
          • Strtok!
          • Cases
          • Concatenation
          • Html-encoding
          • Character-kinds
          • Substrings
          • Strtok
          • Equivalences
          • Url-encoding
          • Lines
          • Explode-implode-equalities
          • Ordering
          • Numbers
          • Pad-trim
          • Coercion
          • Std/strings/digit-to-char
          • Substitution
          • Symbols
        • Std/osets
        • Std/io
        • Std/basic
        • Std/system
        • Std/typed-lists
        • Std/bitsets
        • Std/testing
        • Std/typed-alists
        • Std/stobjs
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Pretty-printing-implementation

    Print-flat-objs

    We print the elements of x, separated by spaces. If x is a non-nil atom, we print a dot and then x.

    Signature
    (print-flat-objs x config eviscp acc) → new-acc
    Arguments
    config — Guard (printconfig-p config).
    eviscp — Guard (booleanp eviscp).
    Returns
    new-acc — Type (character-listp new-acc), given (character-listp acc).

    See the discussion in pflat-p: x here is the what field from some pflat object.

    Definitions and Theorems

    Function: print-flat-objs

    (defun print-flat-objs (x config eviscp acc)
      (declare (xargs :guard (and (printconfig-p config)
                                  (booleanp eviscp))))
      (let ((acl2::__function__ 'print-flat-objs))
        (declare (ignorable acl2::__function__))
        (cond ((not x) acc)
              ((or (atom x)
                   (and eviscp (evisceratedp x)))
               (b* ((acc (cons #\. acc))
                    (acc (cons #\Space acc)))
                 (print-flat x config eviscp acc)))
              (t (b* ((acc (print-flat (car x) config eviscp acc))
                      ((unless (cdr x)) acc)
                      (acc (cons #\Space acc)))
                   (print-flat-objs (cdr x)
                                    config eviscp acc))))))

    Theorem: character-listp-of-print-flat-objs

    (defthm character-listp-of-print-flat-objs
      (implies (character-listp acc)
               (b* ((new-acc (print-flat-objs x config eviscp acc)))
                 (character-listp new-acc)))
      :rule-classes :rewrite)