Get the name from most descriptions, or
(vl-description->name x) → name
Function:
(defun vl-description->name (x) (declare (xargs :guard (vl-description-p x))) (let ((__function__ 'vl-description->name)) (declare (ignorable __function__)) (b* ((x (vl-description-fix x))) (case (tag x) (:vl-module (vl-module->name x)) (:vl-udp (vl-udp->name x)) (:vl-interface (vl-interface->name x)) (:vl-package (vl-package->name x)) (:vl-program (vl-program->name x)) (:vl-config (vl-config->name x)) (:vl-taskdecl (vl-taskdecl->name x)) (:vl-fundecl (vl-fundecl->name x)) (:vl-paramdecl (vl-paramdecl->name x)) (:vl-import nil) (:vl-fwdtypedef nil) (:vl-typedef (vl-typedef->name x)) (otherwise (impossible))))))
Theorem:
(defthm maybe-stringp-of-vl-description->name (b* ((name (vl-description->name x))) (maybe-stringp name)) :rule-classes :type-prescription)
Theorem:
(defthm vl-description->name-of-vl-description-fix-x (equal (vl-description->name (vl-description-fix x)) (vl-description->name x)))
Theorem:
(defthm vl-description->name-vl-description-equiv-congruence-on-x (implies (vl-description-equiv x x-equiv) (equal (vl-description->name x) (vl-description->name x-equiv))) :rule-classes :congruence)