• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • 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-printable-p
            • Vl-print
            • 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
            • Verilog-printing
            • Printing-locally
            • Formatted-printing
            • Accessing-printed-output
            • Vl-printedlist
            • Json-printing
          • Esim-vl
          • Well-formedness
        • Sv
        • Vwsim
        • Fgl
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Testing-utilities
      • Math
    • Basic-printing

    Vl-string-needs-html-encoding-p

    Signature
    (vl-string-needs-html-encoding-p x n xl) → *
    Arguments
    x — Guard (stringp x).
    n — Guard (natp n).
    xl — Guard (eql xl (length x)).

    Definitions and Theorems

    Function: vl-string-needs-html-encoding-p

    (defun
         vl-string-needs-html-encoding-p (x n xl)
         (declare (xargs :guard (and (stringp x)
                                     (natp n)
                                     (eql xl (length x)))))
         (declare (type string x)
                  (type unsigned-byte n xl))
         (declare (xargs :split-types t :guard (<= n xl)))
         (let ((__function__ 'vl-string-needs-html-encoding-p))
              (declare (ignorable __function__))
              (b* (((when (mbe :logic (zp (- (nfix xl) (nfix n)))
                               :exec (eql xl n)))
                    nil)
                   ((the character char) (char x n)))
                  (or (eql char #\Space)
                      (eql char #\Newline)
                      (eql char #\<)
                      (eql char #\>)
                      (eql char #\&)
                      (eql char #\")
                      (eql char #\Tab)
                      (vl-string-needs-html-encoding-p x (+ 1 (lnfix n))
                                                       xl)))))

    Theorem: vl-string-needs-html-encoding-p-of-str-fix-x

    (defthm vl-string-needs-html-encoding-p-of-str-fix-x
            (equal (vl-string-needs-html-encoding-p (str-fix x)
                                                    n xl)
                   (vl-string-needs-html-encoding-p x n xl)))

    Theorem: vl-string-needs-html-encoding-p-streqv-congruence-on-x

    (defthm
        vl-string-needs-html-encoding-p-streqv-congruence-on-x
        (implies (streqv x x-equiv)
                 (equal (vl-string-needs-html-encoding-p x n xl)
                        (vl-string-needs-html-encoding-p x-equiv n xl)))
        :rule-classes :congruence)

    Theorem: vl-string-needs-html-encoding-p-of-nfix-n

    (defthm vl-string-needs-html-encoding-p-of-nfix-n
            (equal (vl-string-needs-html-encoding-p x (nfix n)
                                                    xl)
                   (vl-string-needs-html-encoding-p x n xl)))

    Theorem: vl-string-needs-html-encoding-p-nat-equiv-congruence-on-n

    (defthm
        vl-string-needs-html-encoding-p-nat-equiv-congruence-on-n
        (implies (acl2::nat-equiv n n-equiv)
                 (equal (vl-string-needs-html-encoding-p x n xl)
                        (vl-string-needs-html-encoding-p x n-equiv xl)))
        :rule-classes :congruence)