• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
          • Preprocessor
          • Vl-loadconfig
          • Lexer
          • Vl-loadstate
          • Parser
          • Vl-load-merge-descriptions
          • Scope-of-defines
          • Vl-load-file
          • Vl-flush-out-descriptions
          • Vl-description
          • Vl-loadresult
          • Vl-read-file
          • Vl-find-basename/extension
          • Vl-read-files
          • Vl-find-file
          • Extended-characters
          • Vl-load
          • Vl-load-main
          • Vl-load-description
          • Vl-descriptions-left-to-load
            • Inject-warnings
            • Vl-load-descriptions
            • Vl-load-files
            • Vl-load-summary
            • Vl-collect-modules-from-descriptions
            • Vl-descriptionlist
          • Transforms
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Vwsim
        • Fgl
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Testing-utilities
      • Math
    • Loader

    Vl-descriptions-left-to-load

    Determine which descriptions we still need to load.

    Signature
    (vl-descriptions-left-to-load st) → names
    Arguments
    st — Guard (vl-loadstate-p st).
    Returns
    names — Type (string-listp names).

    For loading to be completely done, we want to have:

    • All descriptions that the user told us to load in the :start-names, and
    • All descriptions that are ever referenced anywhere in any description that we have already loaded.

    This function computes the names of descriptions that we want for the above reasons, but which we do not yet have loaded. These are the descriptions we'll need to search for.

    Definitions and Theorems

    Function: vl-descriptions-left-to-load

    (defun
     vl-descriptions-left-to-load (st)
     (declare (xargs :guard (vl-loadstate-p st)))
     (let
      ((__function__ 'vl-descriptions-left-to-load))
      (declare (ignorable __function__))
      (b*
        (((vl-loadstate st) st)
         ((vl-loadconfig config) st.config)
         (current-mods (vl-collect-modules-from-descriptions st.descs))
         (things-we-want-loaded
              (mergesort
                   (append config.start-names
                           (vl-modulelist-everinstanced current-mods))))
         (things-we-have-loaded
              (mergesort (vl-descriptionlist->names st.descs))))
        (difference things-we-want-loaded
                    things-we-have-loaded))))

    Theorem: string-listp-of-vl-descriptions-left-to-load

    (defthm string-listp-of-vl-descriptions-left-to-load
            (b* ((names (vl-descriptions-left-to-load st)))
                (string-listp names))
            :rule-classes :rewrite)