(vl-modulelist-toplevel x) gathers the names of any modules that
are defined in the module list
(vl-modulelist-toplevel x) → names
Memoized. Cleared in vl-scopestacks-free.
Function:
(defun vl-modulelist-toplevel (x) (declare (xargs :guard (vl-modulelist-p x))) (let ((__function__ 'vl-modulelist-toplevel)) (declare (ignorable __function__)) (mbe :logic (let ((mentioned (mergesort (vl-modulelist-everinstanced x))) (defined (mergesort (vl-modulelist->names x)))) (difference defined mentioned)) :exec (let* ((mentioned (mergesort (vl-modulelist-everinstanced x))) (names (vl-modulelist->names x)) (defined (if (setp names) names (mergesort names)))) (difference defined mentioned)))))
Theorem:
(defthm string-listp-of-vl-modulelist-toplevel (b* ((names (vl-modulelist-toplevel x))) (string-listp names)) :rule-classes :rewrite)
Theorem:
(defthm true-listp-of-vl-modulelist-toplevel (true-listp (vl-modulelist-toplevel x)) :rule-classes :type-prescription)
Theorem:
(defthm setp-of-vl-modulelist-toplevel (setp (vl-modulelist-toplevel x)))
Theorem:
(defthm vl-find-module-when-member-of-vl-modulelist-toplevel (implies (member name (vl-modulelist-toplevel x)) (vl-find-module name x)))
Theorem:
(defthm vl-modulelist-toplevel-of-vl-modulelist-fix-x (equal (vl-modulelist-toplevel (vl-modulelist-fix x)) (vl-modulelist-toplevel x)))
Theorem:
(defthm vl-modulelist-toplevel-vl-modulelist-equiv-congruence-on-x (implies (vl-modulelist-equiv x x-equiv) (equal (vl-modulelist-toplevel x) (vl-modulelist-toplevel x-equiv))) :rule-classes :congruence)