Make a vl-dirxcache for a directory.
(vl-make-dirxcache dir extensions warnings state) → (mv cache warnings state)
Function:
(defun vl-make-dirxcache (dir extensions warnings state) (declare (xargs :stobjs (state))) (declare (xargs :guard (and (stringp dir) (string-listp extensions) (vl-warninglist-p warnings)))) (let ((__function__ 'vl-make-dirxcache)) (declare (ignorable __function__)) (b* ((dir (string-fix dir)) ((mv err files state) (time$ (oslib::ls-files dir) :msg "vl-make-dirxcache: ls-files: ~st sec, ~sa bytes~%" :mintime 1/2)) ((when err) (mv nil (warn :type :vl-filesystem-error :msg "Error creating directory cache for ~s0. ~@1." :args (list dir err)) state)) (cache (vl-make-dirxcache-aux files extensions nil))) (mv cache (ok) state))))
Theorem:
(defthm vl-dirxcache-p-of-vl-make-dirxcache.cache (b* (((mv ?cache ?warnings acl2::?state) (vl-make-dirxcache dir extensions warnings state))) (vl-dirxcache-p cache)) :rule-classes :rewrite)
Theorem:
(defthm vl-warninglist-p-of-vl-make-dirxcache.warnings (b* (((mv ?cache ?warnings acl2::?state) (vl-make-dirxcache dir extensions warnings state))) (vl-warninglist-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm state-p1-of-vl-make-dirxcache.state (implies (force (state-p1 state)) (b* (((mv ?cache ?warnings acl2::?state) (vl-make-dirxcache dir extensions warnings state))) (state-p1 state))) :rule-classes :rewrite)
Theorem:
(defthm vl-make-dirxcache-of-str-fix-dir (equal (vl-make-dirxcache (str-fix dir) extensions warnings state) (vl-make-dirxcache dir extensions warnings state)))
Theorem:
(defthm vl-make-dirxcache-streqv-congruence-on-dir (implies (streqv dir dir-equiv) (equal (vl-make-dirxcache dir extensions warnings state) (vl-make-dirxcache dir-equiv extensions warnings state))) :rule-classes :congruence)
Theorem:
(defthm vl-make-dirxcache-of-string-list-fix-extensions (equal (vl-make-dirxcache dir (string-list-fix extensions) warnings state) (vl-make-dirxcache dir extensions warnings state)))
Theorem:
(defthm vl-make-dirxcache-string-list-equiv-congruence-on-extensions (implies (str::string-list-equiv extensions extensions-equiv) (equal (vl-make-dirxcache dir extensions warnings state) (vl-make-dirxcache dir extensions-equiv warnings state))) :rule-classes :congruence)
Theorem:
(defthm vl-make-dirxcache-of-vl-warninglist-fix-warnings (equal (vl-make-dirxcache dir extensions (vl-warninglist-fix warnings) state) (vl-make-dirxcache dir extensions warnings state)))
Theorem:
(defthm vl-make-dirxcache-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-make-dirxcache dir extensions warnings state) (vl-make-dirxcache dir extensions warnings-equiv state))) :rule-classes :congruence)