Filter names to remove wires that are already declared. We remove the names of any port declarations, ordinary declarations, global names, and imported names.
(vl-remove-declared-wires names st) → implicit
Function:
(defun vl-remove-declared-wires (names st) (declare (xargs :guard (and (string-listp names) (vl-implicitst-p st)))) (let ((__function__ 'vl-remove-declared-wires)) (declare (ignorable __function__)) (b* (((when (atom names)) nil) ((vl-implicitst st)) (name1 (string-fix (car names))) ((when (or (hons-get name1 st.decls) (hons-get name1 st.portdecls) (vl-packagemap-find-name name1 st.wildpkgs) (vl-scopestack-find-item name1 st.ss))) (vl-remove-declared-wires (cdr names) st))) (cons name1 (vl-remove-declared-wires (cdr names) st)))))
Theorem:
(defthm string-listp-of-vl-remove-declared-wires (b* ((implicit (vl-remove-declared-wires names st))) (string-listp implicit)) :rule-classes :rewrite)
Theorem:
(defthm vl-remove-declared-wires-of-string-list-fix-names (equal (vl-remove-declared-wires (string-list-fix names) st) (vl-remove-declared-wires names st)))
Theorem:
(defthm vl-remove-declared-wires-string-list-equiv-congruence-on-names (implies (str::string-list-equiv names names-equiv) (equal (vl-remove-declared-wires names st) (vl-remove-declared-wires names-equiv st))) :rule-classes :congruence)
Theorem:
(defthm vl-remove-declared-wires-of-vl-implicitst-fix-st (equal (vl-remove-declared-wires names (vl-implicitst-fix st)) (vl-remove-declared-wires names st)))
Theorem:
(defthm vl-remove-declared-wires-vl-implicitst-equiv-congruence-on-st (implies (vl-implicitst-equiv st st-equiv) (equal (vl-remove-declared-wires names st) (vl-remove-declared-wires names st-equiv))) :rule-classes :congruence)