Function:
(defun vl-read-zip-aux (channel acc state) (declare (xargs :stobjs (state))) (declare (xargs :guard (and (alistp acc) (and (symbolp channel) (open-input-channel-p channel :object state))))) (let ((__function__ 'vl-read-zip-aux)) (declare (ignorable __function__)) (b* (((unless (mbt (state-p state))) (mv acc state)) ((mv eofp obj state) (read-object channel state)) ((when eofp) (mv acc state)) ((unless (and (tuplep 2 obj) (symbolp (first obj)))) (vl-read-zip-aux channel acc state)) ((list key value) obj) (acc (cons (cons key value) acc))) (vl-read-zip-aux channel acc state))))
Theorem:
(defthm alistp-of-vl-read-zip-aux.acc (implies (alistp acc) (b* (((mv ?acc ?new-state) (vl-read-zip-aux channel acc state))) (alistp acc))) :rule-classes :rewrite)
Theorem:
(defthm state-p1-of-vl-read-zip-aux (b* (((mv ?acc ?new-state) (vl-read-zip-aux channel acc state))) (implies (and (state-p1 state) (symbolp channel) (open-input-channel-p1 channel :object state)) (state-p1 new-state))))
Theorem:
(defthm open-input-channel-p1-of-vl-read-zip-aux (b* (((mv ?acc ?new-state) (vl-read-zip-aux channel acc state))) (implies (and (state-p1 state) (symbolp channel) (open-input-channel-p1 channel :object state)) (open-input-channel-p1 channel :object new-state))))