• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Vwsim
      • Fgl
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
          • Ps
          • Verilog-printing
          • Basic-printing
            • Vl-println?
            • Vl-printable-p
            • Vl-print
              • Vl-print-raw-fast
                • Vl-print-charlist-main
                • Vl-print-str-main
                • Vl-print-main
                • Vl-print-non-string
                • Vl-print-str
              • Vl-col-after-printing-chars
              • Vl-print-strings-with-commas
              • Vl-col-after-printing-string
              • 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
            • Printing-locally
            • Formatted-printing
            • Accessing-printed-output
            • Json-printing
            • Vl-printedlist
          • Kit
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Testing-utilities
      • Math
    • Vl-print

    Vl-print-raw-fast

    Fancy hack for printing string literals.

    Signature
    (vl-print-raw-fast x len &key (ps 'ps)) → ps
    Arguments
    x — Guard (stringp x).
    len — Guard (natp len).

    See for instance vl-print-str for details.

    Definitions and Theorems

    Function: vl-print-raw-fast-fn

    (defun
     vl-print-raw-fast-fn (x len ps)
     (declare (xargs :stobjs (ps)))
     (declare (xargs :guard (and (stringp x) (natp len))))
     (declare (type unsigned-byte len)
              (type string x))
     (declare (xargs :split-types t))
     (let
        ((__function__ 'vl-print-raw-fast))
        (declare (ignorable __function__))
        (vl-ps-seq
             (vl-ps-update-rchars (cons (string-fix x) (vl-ps->rchars)))
             (vl-ps-update-col (the unsigned-byte
                                    (+ (lnfix len) (vl-ps->col)))))))

    Theorem: vl-print-raw-fast-fn-of-str-fix-x

    (defthm vl-print-raw-fast-fn-of-str-fix-x
            (equal (vl-print-raw-fast-fn (str-fix x)
                                         len ps)
                   (vl-print-raw-fast-fn x len ps)))

    Theorem: vl-print-raw-fast-fn-streqv-congruence-on-x

    (defthm vl-print-raw-fast-fn-streqv-congruence-on-x
            (implies (streqv x x-equiv)
                     (equal (vl-print-raw-fast-fn x len ps)
                            (vl-print-raw-fast-fn x-equiv len ps)))
            :rule-classes :congruence)

    Theorem: vl-print-raw-fast-fn-of-nfix-len

    (defthm vl-print-raw-fast-fn-of-nfix-len
            (equal (vl-print-raw-fast-fn x (nfix len) ps)
                   (vl-print-raw-fast-fn x len ps)))

    Theorem: vl-print-raw-fast-fn-nat-equiv-congruence-on-len

    (defthm vl-print-raw-fast-fn-nat-equiv-congruence-on-len
            (implies (acl2::nat-equiv len len-equiv)
                     (equal (vl-print-raw-fast-fn x len ps)
                            (vl-print-raw-fast-fn x len-equiv ps)))
            :rule-classes :congruence)