• 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
          • 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
            • *vl-url-encode-array*
            • Vl-url-encode-chars-aux
              • Vl-url-encode-char
              • Vl-url-encode-chars
              • Vl-url-encode-string
              • Vl-url-encode-string-aux
              • Vl-fast-url-encode-char
            • 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
    • Url-encoding

    Vl-url-encode-chars-aux

    URL encode a list of characters onto an accumulator in reverse order.

    Signature
    (vl-url-encode-chars-aux chars acc) → encoded
    Arguments
    chars — Guard (character-listp chars).
    Returns
    encoded — Type (character-listp encoded), given (character-listp acc).

    Definitions and Theorems

    Function: vl-url-encode-chars-aux

    (defun vl-url-encode-chars-aux (chars acc)
      (declare (xargs :guard (character-listp chars)))
      (let ((__function__ 'vl-url-encode-chars-aux))
        (declare (ignorable __function__))
        (if (atom chars)
            acc
          (vl-url-encode-chars-aux
               (cdr chars)
               (revappend (vl-fast-url-encode-char (car chars))
                          acc)))))

    Theorem: character-listp-of-vl-url-encode-chars-aux

    (defthm character-listp-of-vl-url-encode-chars-aux
      (implies (character-listp acc)
               (b* ((encoded (vl-url-encode-chars-aux chars acc)))
                 (character-listp encoded)))
      :rule-classes :rewrite)

    Theorem: true-listp-of-vl-url-encode-chars-aux

    (defthm true-listp-of-vl-url-encode-chars-aux
      (equal (true-listp (vl-url-encode-chars-aux x acc))
             (true-listp acc)))

    Theorem: vl-url-encode-chars-aux-of-make-character-list-chars

    (defthm vl-url-encode-chars-aux-of-make-character-list-chars
      (equal (vl-url-encode-chars-aux (make-character-list chars)
                                      acc)
             (vl-url-encode-chars-aux chars acc)))

    Theorem: vl-url-encode-chars-aux-charlisteqv-congruence-on-chars

    (defthm vl-url-encode-chars-aux-charlisteqv-congruence-on-chars
      (implies (str::charlisteqv chars chars-equiv)
               (equal (vl-url-encode-chars-aux chars acc)
                      (vl-url-encode-chars-aux chars-equiv acc)))
      :rule-classes :congruence)