• 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

    Keyword-param-valuep

    Does a pretty-printer instruction represent a single object, which could plausibly be the value of a keyword parameter?

    Signature
    (keyword-param-valuep x eviscp) → bool
    Arguments
    x — Guard (pinst-p x).
    eviscp — Guard (booleanp eviscp).

    The only kinds of instructions we don't match are:

    • KEYPAIR instructions,
    • FLAT instructions representing dotted objects `. atm',
    • FLAT instructions representing several objects `a b c', and
    • KEYWORD instructions, which represent keywords whose associated values are on the next line. These wouldn't be provided as the value of a keyword argument.

    Definitions and Theorems

    Function: keyword-param-valuep

    (defun keyword-param-valuep (x eviscp)
      (declare (xargs :guard (and (pinst-p x) (booleanp eviscp))))
      (let ((acl2::__function__ 'keyword-param-valuep))
        (declare (ignorable acl2::__function__))
        (case (pinst-kind x)
          (:flat (b* ((what (pflat->what (pinst-flat->guts x)))
                      ((when (or (atom what)
                                 (and eviscp (evisceratedp what))))
                       nil))
                   (not (cdr what))))
          ((:quote :wide :indent) t)
          (otherwise nil))))