Read only the header information out of a vlzip file.
(vl-read-zip-header filename &key (state 'state)) → (mv name syntax date ltime state)
This should be relatively fast; it doesn't have to read the whole file.
Function:
(defun vl-read-zip-header-fn (filename state) (declare (xargs :stobjs (state))) (declare (xargs :guard (stringp filename))) (let ((__function__ 'vl-read-zip-header)) (declare (ignorable __function__)) (b* ((filename (string-fix filename)) ((mv channel state) (open-input-channel filename :object state)) ((unless channel) (mv nil nil nil nil state)) ((mv name syntax date ltime state) (vl-read-zip-header-aux channel :name nil :syntax nil :date nil :ltime nil)) (state (close-input-channel channel state))) (mv name syntax date ltime state))))
Theorem:
(defthm maybe-stringp-of-vl-read-zip-header.name (b* (((mv ?name ?syntax ?date ?ltime acl2::?state) (vl-read-zip-header-fn filename state))) (maybe-stringp name)) :rule-classes :type-prescription)
Theorem:
(defthm maybe-stringp-of-vl-read-zip-header.syntax (b* (((mv ?name ?syntax ?date ?ltime acl2::?state) (vl-read-zip-header-fn filename state))) (maybe-stringp syntax)) :rule-classes :type-prescription)
Theorem:
(defthm maybe-stringp-of-vl-read-zip-header.date (b* (((mv ?name ?syntax ?date ?ltime acl2::?state) (vl-read-zip-header-fn filename state))) (maybe-stringp date)) :rule-classes :type-prescription)
Theorem:
(defthm maybe-natp-of-vl-read-zip-header.ltime (b* (((mv ?name ?syntax ?date ?ltime acl2::?state) (vl-read-zip-header-fn filename state))) (maybe-natp ltime)) :rule-classes :type-prescription)
Theorem:
(defthm state-p1-of-vl-read-zip-header.state (implies (state-p1 state) (b* (((mv ?name ?syntax ?date ?ltime acl2::?state) (vl-read-zip-header-fn filename state))) (state-p1 state))) :rule-classes :rewrite)