• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
        • Lint
        • Mlib
          • Scopestack
          • Filtering-by-name
          • Vl-namefactory
          • Substitution
          • Allexprs
          • Hid-tools
          • Vl-consteval
          • Range-tools
          • Lvalexprs
          • Hierarchy
            • Vl-remove-unnecessary-elements
            • Vl-necessary-elements-transitive
            • Vl-dependent-elements-transitive
            • Vl-necessary-elements-direct
            • Vl-modulelist-everinstanced
            • Vl-dependent-elements-direct
            • Vl-modulelist-toplevel
              • Vl-design-deporder-modules
              • Vl-design-check-complete
              • Vl-design-upgraph
              • Immdeps
              • Vl-design-downgraph
              • Vl-collect-dependencies
              • Vl-hierarchy-free
            • Finding-by-name
            • Expr-tools
            • Expr-slicing
            • Stripping-functions
            • Stmt-tools
            • Modnamespace
            • Vl-parse-expr-from-str
            • Welltyped
            • Reordering-by-name
            • Flat-warnings
            • Genblob
            • Expr-building
            • Datatype-tools
            • Syscalls
            • Relocate
            • Expr-cleaning
            • Namemangle
            • Caremask
            • Port-tools
            • Lvalues
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Hierarchy

    Vl-modulelist-toplevel

    (vl-modulelist-toplevel x) gathers the names of any modules that are defined in the module list x but are never instantiated in x, and returns them as an ordered set.

    Signature
    (vl-modulelist-toplevel x) → names
    Arguments
    x — Guard (vl-modulelist-p x).
    Returns
    names — Type (string-listp names).

    Memoized. Cleared in vl-scopestacks-free.

    Definitions and Theorems

    Function: vl-modulelist-toplevel

    (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: string-listp-of-vl-modulelist-toplevel

    (defthm string-listp-of-vl-modulelist-toplevel
      (b* ((names (vl-modulelist-toplevel x)))
        (string-listp names))
      :rule-classes :rewrite)

    Theorem: true-listp-of-vl-modulelist-toplevel

    (defthm true-listp-of-vl-modulelist-toplevel
      (true-listp (vl-modulelist-toplevel x))
      :rule-classes :type-prescription)

    Theorem: setp-of-vl-modulelist-toplevel

    (defthm setp-of-vl-modulelist-toplevel
      (setp (vl-modulelist-toplevel x)))

    Theorem: vl-find-module-when-member-of-vl-modulelist-toplevel

    (defthm vl-find-module-when-member-of-vl-modulelist-toplevel
      (implies (member name (vl-modulelist-toplevel x))
               (vl-find-module name x)))

    Theorem: vl-modulelist-toplevel-of-vl-modulelist-fix-x

    (defthm vl-modulelist-toplevel-of-vl-modulelist-fix-x
      (equal (vl-modulelist-toplevel (vl-modulelist-fix x))
             (vl-modulelist-toplevel x)))

    Theorem: vl-modulelist-toplevel-vl-modulelist-equiv-congruence-on-x

    (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)