Converts a hierarchical identifier expression into a string like
(vl-flatten-hidexpr x) → flat-string
Function:
(defun vl-flatten-hidexpr (x) (declare (xargs :guard (vl-hidexpr-p x))) (declare (xargs :guard (vl-hidexpr-resolved-p x))) (let ((__function__ 'vl-flatten-hidexpr)) (declare (ignorable __function__)) (vl-hidexpr-case x :end x.name :dot (cat (vl-flatten-hidindex x.first) "." (vl-flatten-hidexpr x.rest)))))
Theorem:
(defthm stringp-of-vl-flatten-hidexpr (b* ((flat-string (vl-flatten-hidexpr x))) (stringp flat-string)) :rule-classes :type-prescription)
Theorem:
(defthm vl-flatten-hidexpr-of-vl-hidexpr-fix-x (equal (vl-flatten-hidexpr (vl-hidexpr-fix x)) (vl-flatten-hidexpr x)))
Theorem:
(defthm vl-flatten-hidexpr-vl-hidexpr-equiv-congruence-on-x (implies (vl-hidexpr-equiv x x-equiv) (equal (vl-flatten-hidexpr x) (vl-flatten-hidexpr x-equiv))) :rule-classes :congruence)