Function:
(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:
(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:
(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:
(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:
(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)