• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
          • Name-database
          • Vl-gc
          • Make-lookup-alist
          • Symbol-list-names
          • Html-encoding
            • Vl-html-encode-chars-aux
            • Vl-html-encode-push
            • Vl-html-encode-next-col
            • Vl-html-encode-string
            • Vl-distance-to-tab
            • Vl-html-encode-string-aux
              • Repeated-revappend
              • *vl-html-newline*
              • *vl-html-&quot*
              • *vl-html-&nbsp*
              • *vl-html-&lt*
              • *vl-html-&gt*
              • *vl-html-&amp*
            • Nats-from
            • Redundant-mergesort
            • Longest-common-prefix
            • Vl-edition-p
            • Nat-listp
            • Vl-plural-p
            • Vl-remove-keys
            • Sum-nats
            • Vl-maybe-nat-listp
            • Url-encoding
            • Fast-memberp
            • Vl-string-keys-p
            • Max-nats
            • Longest-common-prefix-list
            • Character-list-listp
            • Vl-string-list-values-p
            • Vl-character-list-list-values-p
            • Remove-from-alist
            • Prefix-of-eachp
            • Vl-maybe-string-listp
            • Pos-listp
            • Vl-string-values-p
            • String-list-listp
            • True-list-listp
            • Symbol-list-listp
            • Explode-list
            • All-have-len
            • Min-nats
            • Debuggable-and
            • Vl-starname
            • Remove-equal-without-guard
            • String-fix
            • Longer-than-p
            • Clean-alist
            • Anyp
            • Or*
            • Fast-alist-free-each-alist-val
            • And*
            • Not*
            • Free-list-of-fast-alists
            • *nls*
          • Loader
          • Transforms
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Html-encoding

    Vl-html-encode-string-aux

    Print an HTML encoded string, efficiently, without exploding it.

    Signature
    (vl-html-encode-string-aux x n xl col tabsize acc) 
      → 
    (mv new-col new-acc)
    Arguments
    x — Guard (stringp x).
    n — Guard (natp n).
    xl — Guard (eql xl (length x)).
    col — Guard (natp col).
    tabsize — Guard (posp tabsize).

    We just leave this enabled since its logical definition is so simple.

    Definitions and Theorems

    Function: vl-html-encode-string-aux

    (defun vl-html-encode-string-aux (x n xl col tabsize acc)
      (declare (xargs :guard (and (stringp x)
                                  (natp n)
                                  (natp col)
                                  (posp tabsize)
                                  (eql xl (length x)))))
      (declare (type string x)
               (type integer n xl col tabsize))
      (declare (xargs :split-types t :guard (<= n xl)))
      (let ((__function__ 'vl-html-encode-string-aux))
        (declare (ignorable __function__))
        (mbe :logic
             (vl-html-encode-chars-aux (nthcdr n (explode x))
                                       col tabsize acc)
             :exec
             (b* (((when (mbe :logic (zp (- (nfix xl) (nfix n)))
                              :exec (eql n xl)))
                   (mv (lnfix col) acc))
                  (char1 (char x n))
                  (acc (vl-html-encode-push char1 col tabsize acc))
                  (col (vl-html-encode-next-col char1 col tabsize)))
               (vl-html-encode-string-aux x (+ 1 (lnfix n))
                                          xl col tabsize acc)))))