Main function for gathering up the names that are declared as parameters, wires, variables, registers, and so on.
(vl-module->modnamespace x) → names
Note: this function does not include the names of ports, because as noted above they are considered to be in their own namespace which is "separate but overlapping" the main namespace in the module; see modnamespace for details.
If this function returns a list that is not duplicate-free, it means the module illegally declares those duplicated names more than once.
To reduce memory usage, we optimize this function using
Function:
(defun vl-module->modnamespace (x) (declare (xargs :guard (vl-module-p x))) (let ((__function__ 'vl-module->modnamespace)) (declare (ignorable __function__)) (mbe :logic (b* (((vl-module x) x)) (append (vl-vardecllist->names x.vardecls) (vl-paramdecllist->names x.paramdecls) (vl-fundecllist->names x.fundecls) (vl-taskdecllist->names x.taskdecls) (vl-modinstlist->instnames x.modinsts) (vl-gateinstlist->names x.gateinsts))) :exec (with-local-nrev (vl-module->modnamespace-nrev x nrev)))))
Theorem:
(defthm string-listp-of-vl-module->modnamespace (b* ((names (vl-module->modnamespace x))) (string-listp names)) :rule-classes :rewrite)
Theorem:
(defthm vl-module->modnamespace-nrev-removal (equal (vl-module->modnamespace-nrev x nrev) (append nrev (vl-module->modnamespace x))))
Theorem:
(defthm true-listp-of-vl-module->modnamespace (true-listp (vl-module->modnamespace x)) :rule-classes :type-prescription)
Theorem:
(defthm vl-module->modnamespace-of-vl-module-fix-x (equal (vl-module->modnamespace (vl-module-fix x)) (vl-module->modnamespace x)))
Theorem:
(defthm vl-module->modnamespace-vl-module-equiv-congruence-on-x (implies (vl-module-equiv x x-equiv) (equal (vl-module->modnamespace x) (vl-module->modnamespace x-equiv))) :rule-classes :congruence)