• 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
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
          • Vl-lint
          • Vl-server
          • Vl-gather
          • Vl-zip
            • Vl-zip-opts-p
            • Vl-zipfile
              • Vl-zipfile-fix
              • Vl-read-zip-header
                • Vl-read-zip-header-aux
                • Vl-read-zip-aux
                • Vl-maybe-zipfile
                • Vl-read-zip
                • Make-vl-zipfile
                • Vl-zipfile-equiv
                • Vl-zipfile-p
                • Change-vl-zipfile
                • Vl-zipfile->syntax
                • Vl-zipfile->filemap
                • Vl-zipfile->design
                • Vl-zipfile->defines
                • Vl-zipfile->name
                • Vl-zipfile->ltime
                • Vl-zipfile->date
                • Vl-write-zip
              • *vl-zip-help*
              • Vl-zip-top
              • Vl-zip-main
            • Vl-main
            • Split-plusargs
            • Vl-shell
            • Vl-json
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-read-zip-header

    Vl-read-zip-aux

    Signature
    (vl-read-zip-aux channel acc state) → (mv acc new-state)
    Arguments
    channel — Guard (and (symbolp channel) (open-input-channel-p channel :object state)).
    acc — Guard (alistp acc).
    Returns
    acc — Alist binding key to values from the file.
        Type (alistp acc), given (alistp acc).

    Definitions and Theorems

    Function: vl-read-zip-aux

    (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: alistp-of-vl-read-zip-aux.acc

    (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: state-p1-of-vl-read-zip-aux

    (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: open-input-channel-p1-of-vl-read-zip-aux

    (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))))