Converts a vl-hidindex-p into a string like
Function:
(defun vl-flatten-hidindex (x) (declare (xargs :guard (vl-expr-p x))) (declare (xargs :guard (and (vl-hidindex-p x) (vl-hidindex-resolved-p x)))) (let ((__function__ 'vl-flatten-hidindex)) (declare (ignorable __function__)) (b* ((name (vl-hidindex->name x)) (indices (vl-hidindex->indices x)) ((when (atom indices)) name) (acc nil) (acc (str::revappend-chars name acc)) (acc (vl-flatten-hidindex-aux indices acc))) (str::rchars-to-string acc))))
Theorem:
(defthm stringp-of-vl-flatten-hidindex (b* ((flat-string (vl-flatten-hidindex x))) (stringp flat-string)) :rule-classes :type-prescription)
Theorem:
(defthm vl-flatten-hidindex-of-vl-expr-fix-x (equal (vl-flatten-hidindex (vl-expr-fix x)) (vl-flatten-hidindex x)))
Theorem:
(defthm vl-flatten-hidindex-vl-expr-equiv-congruence-on-x (implies (vl-expr-equiv x x-equiv) (equal (vl-flatten-hidindex x) (vl-flatten-hidindex x-equiv))) :rule-classes :congruence)