• 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-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-find-file

    Vl-slow-find-file-aux

    Look for a file in a list of search directories (without using the cache).

    Signature
    (vl-slow-find-file-aux filename searchcache state) 
      → 
    (mv foundpath state)
    Arguments
    filename — Guard (stringp filename).
    searchcache — Guard (vl-dirlist-cache-p searchcache).
    Returns
    foundpath — Type (maybe-stringp foundpath).
    state — Type (state-p1 state), given (force (state-p1 state)).

    Definitions and Theorems

    Function: vl-slow-find-file-aux

    (defun vl-slow-find-file-aux (filename searchcache state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (and (stringp filename)
                                 (vl-dirlist-cache-p searchcache))))
     (let ((__function__ 'vl-slow-find-file-aux))
      (declare (ignorable __function__))
      (b*
       ((searchcache (vl-dirlist-cache-fix searchcache))
        ((when (atom searchcache))
         (mv nil state))
        ((cons dir ?cache) (car searchcache))
        (attempt (vl-extend-pathname dir filename))
        ((mv exists-p state)
         (time$
          (vl-file-exists-p attempt state)
          :mintime 1/10
          :msg
          ";; vl-slow-find-file-aux file-exists-p: ~st sec, ~sa bytes for ~f0~%"
          :args (list attempt)))
        ((when exists-p) (mv attempt state)))
       (vl-slow-find-file-aux filename (cdr searchcache)
                              state))))

    Theorem: maybe-stringp-of-vl-slow-find-file-aux.foundpath

    (defthm maybe-stringp-of-vl-slow-find-file-aux.foundpath
      (b* (((mv ?foundpath acl2::?state)
            (vl-slow-find-file-aux filename searchcache state)))
        (maybe-stringp foundpath))
      :rule-classes :type-prescription)

    Theorem: state-p1-of-vl-slow-find-file-aux.state

    (defthm state-p1-of-vl-slow-find-file-aux.state
     (implies (force (state-p1 state))
              (b* (((mv ?foundpath acl2::?state)
                    (vl-slow-find-file-aux filename searchcache state)))
                (state-p1 state)))
     :rule-classes :rewrite)

    Theorem: vl-slow-find-file-aux-of-str-fix-filename

    (defthm vl-slow-find-file-aux-of-str-fix-filename
      (equal (vl-slow-find-file-aux (str-fix filename)
                                    searchcache state)
             (vl-slow-find-file-aux filename searchcache state)))

    Theorem: vl-slow-find-file-aux-streqv-congruence-on-filename

    (defthm vl-slow-find-file-aux-streqv-congruence-on-filename
     (implies
       (streqv filename filename-equiv)
       (equal (vl-slow-find-file-aux filename searchcache state)
              (vl-slow-find-file-aux filename-equiv searchcache state)))
     :rule-classes :congruence)

    Theorem: vl-slow-find-file-aux-of-vl-dirlist-cache-fix-searchcache

    (defthm vl-slow-find-file-aux-of-vl-dirlist-cache-fix-searchcache
      (equal (vl-slow-find-file-aux filename
                                    (vl-dirlist-cache-fix searchcache)
                                    state)
             (vl-slow-find-file-aux filename searchcache state)))

    Theorem: vl-slow-find-file-aux-vl-dirlist-cache-equiv-congruence-on-searchcache

    (defthm
     vl-slow-find-file-aux-vl-dirlist-cache-equiv-congruence-on-searchcache
     (implies
       (vl-dirlist-cache-equiv searchcache searchcache-equiv)
       (equal (vl-slow-find-file-aux filename searchcache state)
              (vl-slow-find-file-aux filename searchcache-equiv state)))
     :rule-classes :congruence)