Validate a string literal.
(valid-stringlit strlit) → (mv erp type)
We check the characters that form the string literal,
with respect to the prefix (if any).
If validation is successful, we return the type of the string literal,
which according to [C:6.4.5/6], is an array type
of
Function:
(defun valid-stringlit (strlit) (declare (xargs :guard (stringlitp strlit))) (let ((__function__ 'valid-stringlit)) (declare (ignorable __function__)) (b* (((reterr) (irr-type)) ((stringlit strlit) strlit) ((erp &) (valid-s-char-list strlit.schars strlit.prefix?))) (retok (type-array)))))
Theorem:
(defthm typep-of-valid-stringlit.type (b* (((mv acl2::?erp ?type) (valid-stringlit strlit))) (typep type)) :rule-classes :rewrite)
Theorem:
(defthm valid-stringlit-of-stringlit-fix-strlit (equal (valid-stringlit (stringlit-fix strlit)) (valid-stringlit strlit)))
Theorem:
(defthm valid-stringlit-stringlit-equiv-congruence-on-strlit (implies (stringlit-equiv strlit strlit-equiv) (equal (valid-stringlit strlit) (valid-stringlit strlit-equiv))) :rule-classes :congruence)