Convert a character list into HTML. Outputs to an accumulator. Tracks the column number to handle tab characters.
(html-encode-chars-aux x col tabsize acc) → (mv new-col new-acc)
Function:
(defun html-encode-chars-aux (x col tabsize acc) (declare (xargs :guard (and (character-listp x) (natp col) (posp tabsize)))) (declare (type unsigned-byte col tabsize)) (declare (xargs :split-types t)) (let ((acl2::__function__ 'html-encode-chars-aux)) (declare (ignorable acl2::__function__)) (b* (((when (atom x)) (mv (lnfix col) acc)) (acc (html-encode-push (car x) col tabsize acc)) (col (html-encode-next-col (car x) col tabsize))) (html-encode-chars-aux (cdr x) col tabsize acc))))
Theorem:
(defthm natp-of-html-encode-chars-aux.new-col (b* (((mv ?new-col ?new-acc) (html-encode-chars-aux x col tabsize acc))) (natp new-col)) :rule-classes :type-prescription)
Theorem:
(defthm character-listp-of-html-encode-chars-aux.new-acc (implies (character-listp acc) (b* (((mv ?new-col ?new-acc) (html-encode-chars-aux x col tabsize acc))) (character-listp new-acc))) :rule-classes :rewrite)
Theorem:
(defthm html-encode-chars-aux-of-make-character-list-x (equal (html-encode-chars-aux (make-character-list x) col tabsize acc) (html-encode-chars-aux x col tabsize acc)))
Theorem:
(defthm html-encode-chars-aux-charlisteqv-congruence-on-x (implies (charlisteqv x x-equiv) (equal (html-encode-chars-aux x col tabsize acc) (html-encode-chars-aux x-equiv col tabsize acc))) :rule-classes :congruence)
Theorem:
(defthm html-encode-chars-aux-of-nfix-col (equal (html-encode-chars-aux x (nfix col) tabsize acc) (html-encode-chars-aux x col tabsize acc)))
Theorem:
(defthm html-encode-chars-aux-nat-equiv-congruence-on-col (implies (acl2::nat-equiv col col-equiv) (equal (html-encode-chars-aux x col tabsize acc) (html-encode-chars-aux x col-equiv tabsize acc))) :rule-classes :congruence)
Theorem:
(defthm html-encode-chars-aux-of-pos-fix-tabsize (equal (html-encode-chars-aux x col (acl2::pos-fix tabsize) acc) (html-encode-chars-aux x col tabsize acc)))
Theorem:
(defthm html-encode-chars-aux-pos-equiv-congruence-on-tabsize (implies (acl2::pos-equiv tabsize tabsize-equiv) (equal (html-encode-chars-aux x col tabsize acc) (html-encode-chars-aux x col tabsize-equiv acc))) :rule-classes :congruence)