• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
        • Lint
        • Mlib
        • Server
        • Kit
        • Printer
          • Ps
          • Basic-printing
            • Vl-println?
            • Vl-print
            • Vl-printable-p
              • Vl-printable-fix
            • Vl-col-after-printing-string
            • Vl-col-after-printing-chars
            • Vl-print-strings-with-commas
            • Vl-string-needs-html-encoding-p
            • Vl-println-markup
            • Vl-print-strings-as-lines
            • Vl-print-url
            • Vl-print-nat
            • Vl-indent
            • Vl-println
            • Vl-print-markup
            • Vl-ps-seq
            • Vl-cw-ps-seq
            • Vl-when-html
            • Vl-ps-span
          • Verilog-printing
          • Printing-locally
          • Formatted-printing
          • Accessing-printed-output
          • Vl-printedlist
          • Json-printing
        • Esim-vl
        • Well-formedness
      • Sv
      • Fgl
      • Vwsim
      • Vl
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Basic-printing

Vl-printable-p

(vl-printable-p x) recognizes strings, character lists, numbers, and ordinary characters.

Signature
(vl-printable-p x) → *

We use this function as the guard for functions such as vl-print, vl-println, etc. We do not allow x to be a symbol because of the potential confusion between the symbol nil and character lists.

Definitions and Theorems

Function: vl-printable-p

(defun vl-printable-p (x)
  (declare (xargs :guard t))
  (let ((__function__ 'vl-printable-p))
    (declare (ignorable __function__))
    (or (stringp x)
        (character-listp x)
        (acl2-numberp x)
        (characterp x))))

Theorem: vl-printable-p-when-stringp

(defthm vl-printable-p-when-stringp
  (implies (stringp x)
           (vl-printable-p x)))

Theorem: vl-printable-p-when-character-listp

(defthm vl-printable-p-when-character-listp
  (implies (character-listp x)
           (vl-printable-p x)))

Theorem: vl-printable-p-when-acl2-numberp

(defthm vl-printable-p-when-acl2-numberp
  (implies (acl2-numberp x)
           (vl-printable-p x)))

Theorem: vl-printable-p-when-characterp

(defthm vl-printable-p-when-characterp
  (implies (characterp x)
           (vl-printable-p x)))

Subtopics

Vl-printable-fix