• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Vwsim
      • Fgl
      • Vl
        • Syntax
        • Loader
          • Preprocessor
          • Vl-loadconfig
          • Vl-loadstate
          • Lexer
          • Parser
          • Vl-load-merge-descriptions
          • Vl-find-basename/extension
          • Vl-load-file
          • Vl-loadresult
          • Vl-find-file
          • Scope-of-defines
          • Vl-flush-out-descriptions
          • Vl-description
          • Vl-read-file
          • Vl-includeskips-report-gather
          • Vl-load-main
          • Extended-characters
          • Vl-load
          • Vl-load-description
            • Vl-preprocess-debug
            • Vl-descriptions-left-to-load
            • Inject-warnings
            • Vl-read-file-report-gather
            • Vl-write-preprocessor-debug-file
            • Vl-load-descriptions
            • Vl-load-files
            • Translate-off
            • Vl-load-read-file-hook
            • Vl-loadstate-pad
            • Vl-read-file-report
            • Vl-load-summary
            • Vl-collect-modules-from-descriptions
            • Vl-loadstate->warnings
            • Vl-iskips-report
            • Vl-descriptionlist
          • Warnings
          • Getting-started
          • Utilities
          • Printer
          • Kit
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Testing-utilities
      • Math
    • Loader

    Vl-load-description

    Try to load a description from the search path.

    Signature
    (vl-load-description name st state) → (mv st state)
    Arguments
    name — The name of the description we want to load.
        Guard (stringp name).
    st — Guard (vl-loadstate-p st).
    Returns
    st — Type (vl-loadstate-p st).
    state — Type (state-p1 state), given (force (state-p1 state)).

    Definitions and Theorems

    Function: vl-load-description

    (defun
     vl-load-description (name st state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (and (stringp name)
                                 (vl-loadstate-p st))))
     (let
      ((__function__ 'vl-load-description))
      (declare (ignorable __function__))
      (b*
       (((vl-loadstate st) st)
        ((vl-loadconfig config) st.config)
        (warnings (vl-parsestate->warnings st.pstate))
        ((mv filename warnings)
         (time$
           (vl-find-basename/extension name config.search-exts
                                       (vl-loadstate->spcache st)
                                       warnings)
           :msg "~s0 (search ~s1: ~st sec, ~sa bytes)~%"
           :args (list (vl-loadstate-pad st) name)
           :mintime (vl-loadconfig->mintime (vl-loadstate->config st))))
        (st (vl-loadstate-set-warnings warnings))
        ((unless filename) (mv st state)))
       (time$
         (vl-load-file filename st state)
         :msg "~s0 (*loaded ~f1; ~st sec, ~sa bytes)~%"
         :args (list (vl-loadstate-pad st) filename)
         :mintime (vl-loadconfig->mintime (vl-loadstate->config st))))))

    Theorem: vl-loadstate-p-of-vl-load-description.st

    (defthm vl-loadstate-p-of-vl-load-description.st
            (b* (((mv ?st acl2::?state)
                  (vl-load-description name st state)))
                (vl-loadstate-p st))
            :rule-classes :rewrite)

    Theorem: state-p1-of-vl-load-description.state

    (defthm state-p1-of-vl-load-description.state
            (implies (force (state-p1 state))
                     (b* (((mv ?st acl2::?state)
                           (vl-load-description name st state)))
                         (state-p1 state)))
            :rule-classes :rewrite)

    Theorem: unique-names-after-vl-load-description

    (defthm
     unique-names-after-vl-load-description
     (b*
      (((mv new-st &)
        (vl-load-description name st state)))
      (implies
       (uniquep (vl-descriptionlist->names (vl-loadstate->descs st)))
       (no-duplicatesp
            (vl-descriptionlist->names (vl-loadstate->descs new-st))))))