• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
          • Preprocessor
          • Vl-loadconfig
          • Vl-loadstate
          • Lexer
          • Parser
          • Vl-load-merge-descriptions
          • Vl-find-basename/extension
          • Vl-load-file
          • Vl-loadresult
          • Scope-of-defines
          • Vl-find-file
            • Vl-slow-find-file-aux
            • Vl-cache-find-file-aux
            • Vl-extend-pathname
            • Vl-file-exists-p
            • Vl-ends-with-directory-separatorp
            • Vl-dirlist-cache
              • Vl-dirlist-cache-p
              • Vl-dirlist-cache-fix
              • Vl-make-dirlist-cache
                • Vl-dirlist-cache-equiv
                • Vl-free-dirlist-cache
              • Vl-dircache
            • Vl-flush-out-descriptions
            • Vl-description
            • Vl-read-file
            • Vl-includeskips-report-gather
            • Vl-load-main
            • Extended-characters
            • Vl-load
            • Vl-load-description
            • Vl-descriptions-left-to-load
            • Inject-warnings
            • Vl-preprocess-debug
            • Vl-write-preprocessor-debug-file
            • Vl-read-file-report-gather
            • Vl-load-descriptions
            • Vl-load-files
            • Translate-off
            • Vl-load-read-file-hook
            • Vl-read-file-report
            • Vl-loadstate-pad
            • 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
      • Math
      • Testing-utilities
    • Vl-dirlist-cache

    Vl-make-dirlist-cache

    Make a vl-dirlist-cache for a list of directories.

    Signature
    (vl-make-dirlist-cache dirs warnings state) 
      → 
    (mv cache warnings state)
    Arguments
    dirs — Directories to list.
        Guard (string-listp dirs).
    warnings — Warnings to extend in case of file errors.
        Guard (vl-warninglist-p warnings).
    Returns
    cache — Type (vl-dirlist-cache-p cache).
    warnings — Type (vl-warninglist-p warnings).
    state — Type (state-p1 state), given (force (state-p1 state)).

    Definitions and Theorems

    Function: vl-make-dirlist-cache

    (defun vl-make-dirlist-cache (dirs warnings state)
      (declare (xargs :stobjs (state)))
      (declare (xargs :guard (and (string-listp dirs)
                                  (vl-warninglist-p warnings))))
      (let ((__function__ 'vl-make-dirlist-cache))
        (declare (ignorable __function__))
        (b* (((when (atom dirs)) (mv nil (ok) state))
             ((mv cache1 warnings state)
              (vl-make-dircache (car dirs)
                                warnings state))
             ((mv rest warnings state)
              (vl-make-dirlist-cache (cdr dirs)
                                     warnings state)))
          (mv (cons (cons (hons-copy (string-fix (car dirs)))
                          cache1)
                    rest)
              warnings state))))

    Theorem: vl-dirlist-cache-p-of-vl-make-dirlist-cache.cache

    (defthm vl-dirlist-cache-p-of-vl-make-dirlist-cache.cache
      (b* (((mv ?cache ?warnings acl2::?state)
            (vl-make-dirlist-cache dirs warnings state)))
        (vl-dirlist-cache-p cache))
      :rule-classes :rewrite)

    Theorem: vl-warninglist-p-of-vl-make-dirlist-cache.warnings

    (defthm vl-warninglist-p-of-vl-make-dirlist-cache.warnings
      (b* (((mv ?cache ?warnings acl2::?state)
            (vl-make-dirlist-cache dirs warnings state)))
        (vl-warninglist-p warnings))
      :rule-classes :rewrite)

    Theorem: state-p1-of-vl-make-dirlist-cache.state

    (defthm state-p1-of-vl-make-dirlist-cache.state
      (implies (force (state-p1 state))
               (b* (((mv ?cache ?warnings acl2::?state)
                     (vl-make-dirlist-cache dirs warnings state)))
                 (state-p1 state)))
      :rule-classes :rewrite)

    Theorem: alist-keys-of-vl-make-dirlist-cache

    (defthm alist-keys-of-vl-make-dirlist-cache
      (b* (((mv ?cache ?warnings acl2::?state)
            (vl-make-dirlist-cache dirs warnings state)))
        (equal (alist-keys cache)
               (string-list-fix dirs))))

    Theorem: vl-make-dirlist-cache-of-string-list-fix-dirs

    (defthm vl-make-dirlist-cache-of-string-list-fix-dirs
      (equal (vl-make-dirlist-cache (string-list-fix dirs)
                                    warnings state)
             (vl-make-dirlist-cache dirs warnings state)))

    Theorem: vl-make-dirlist-cache-string-list-equiv-congruence-on-dirs

    (defthm vl-make-dirlist-cache-string-list-equiv-congruence-on-dirs
     (implies (str::string-list-equiv dirs dirs-equiv)
              (equal (vl-make-dirlist-cache dirs warnings state)
                     (vl-make-dirlist-cache dirs-equiv warnings state)))
     :rule-classes :congruence)

    Theorem: vl-make-dirlist-cache-of-vl-warninglist-fix-warnings

    (defthm vl-make-dirlist-cache-of-vl-warninglist-fix-warnings
      (equal (vl-make-dirlist-cache dirs (vl-warninglist-fix warnings)
                                    state)
             (vl-make-dirlist-cache dirs warnings state)))

    Theorem: vl-make-dirlist-cache-vl-warninglist-equiv-congruence-on-warnings

    (defthm
      vl-make-dirlist-cache-vl-warninglist-equiv-congruence-on-warnings
     (implies (vl-warninglist-equiv warnings warnings-equiv)
              (equal (vl-make-dirlist-cache dirs warnings state)
                     (vl-make-dirlist-cache dirs warnings-equiv state)))
     :rule-classes :congruence)