• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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-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-zipfile

    Vl-write-zip

    Signature
    (vl-write-zip filename contents &key (state 'state)) → state
    Arguments
    filename — Guard (stringp filename).
    contents — Guard (vl-zipfile-p contents).

    Definitions and Theorems

    Function: vl-write-zip-fn

    (defun vl-write-zip-fn (filename contents state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (and (stringp filename)
                                 (vl-zipfile-p contents))))
     (let ((__function__ 'vl-write-zip))
      (declare (ignorable __function__))
      (b*
       (((mv acl2::channel state)
         (open-output-channel! filename
                               :object state))
        ((unless acl2::channel)
         (raise "Failed to open file for writing: ~s0~%"
                filename)
         state)
        ((vl-zipfile contents))
        (state
         (acl2::print-legibly
          (list
           :about
           "This is a .vlzip file created by the VL Verilog Toolkit.")))
        (state (acl2::print-legibly (list :name contents.name)))
        (state (acl2::print-legibly (list :syntax contents.syntax)))
        (state (acl2::print-legibly (list :date contents.date)))
        (state (acl2::print-legibly (list :ltime contents.ltime)))
        (state (acl2::print-compressed (list :design contents.design)))
        (state
             (acl2::print-compressed (list :filemap contents.filemap)))
        (state
             (acl2::print-compressed (list :defines contents.defines)))
        (state (close-output-channel acl2::channel state)))
       state)))

    Theorem: state-p1-of-vl-write-zip

    (defthm state-p1-of-vl-write-zip
      (implies (and (state-p1 state)
                    (stringp filename))
               (state-p1 (vl-write-zip filename contents))))