• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
          • Expression-sizing
          • Occform
          • Oprewrite
            • Vl-op-oprewrite
            • Vl-modulelist-oprewrite
            • Vl-expr-oprewrite
            • Vl-maybe-delayoreventcontrol-oprewrite
            • Vl-repeateventcontrol-oprewrite
            • Vl-plainarglist-oprewrite
            • Vl-namedarglist-oprewrite
            • Vl-gateinstlist-oprewrite
            • Vl-delayoreventcontrol-oprewrite
            • Vl-modinstlist-oprewrite
            • Vl-initiallist-oprewrite
            • Vl-replicate-constint-value
            • Vl-evatomlist-oprewrite
            • Vl-assignlist-oprewrite
            • Vl-arguments-oprewrite
            • Vl-alwayslist-oprewrite
            • Vl-eventcontrol-oprewrite
            • Vl-delaycontrol-oprewrite
            • Vl-plainarg-oprewrite
            • Vl-namedarg-oprewrite
            • Vl-modinst-oprewrite
            • Vl-maybe-expr-oprewrite
            • Vl-initial-oprewrite
            • Vl-gateinst-oprewrite
            • Vl-assign-oprewrite
            • Vl-goofymux-p
            • Vl-evatom-oprewrite
            • Vl-always-oprewrite
            • Vl-replicate-weirdint-bits
            • Vl-maybe-consolidate-multiconcat
            • Vl-qmark-p
            • Vl-goofymux-rewrite
            • Vl-module-oprewrite
              • Vl-design-oprewrite
            • Expand-functions
            • Delayredux
            • Unparameterization
            • Caseelim
            • Split
            • Selresolve
            • Weirdint-elim
            • Vl-delta
            • Replicate-insts
            • Rangeresolve
            • Propagate
            • Clean-selects
            • Clean-params
            • Blankargs
            • Inline-mods
            • Expr-simp
            • Trunc
            • Always-top
            • Gatesplit
            • Gate-elim
            • Expression-optimization
            • Elim-supplies
            • Wildelim
            • Drop-blankports
            • Clean-warnings
            • Addinstnames
            • Custom-transform-hooks
            • Annotate
            • Latchcode
            • Elim-unused-vars
            • Problem-modules
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Oprewrite

    Vl-module-oprewrite

    Signature
    (vl-module-oprewrite x) → new-x
    Arguments
    x — Guard (vl-module-p x).
    Returns
    new-x — Type (vl-module-p new-x).

    Definitions and Theorems

    Function: vl-module-oprewrite

    (defun vl-module-oprewrite (x)
      (declare (xargs :guard (vl-module-p x)))
      (let ((__function__ 'vl-module-oprewrite))
        (declare (ignorable __function__))
        (b* ((x (vl-module-fix x))
             ((vl-module x) x)
             ((when (vl-module->hands-offp x)) x)
             (warnings x.warnings)
             ((mv warnings assigns)
              (vl-assignlist-oprewrite x.assigns warnings))
             ((mv warnings modinsts)
              (vl-modinstlist-oprewrite x.modinsts warnings))
             ((mv warnings gateinsts)
              (vl-gateinstlist-oprewrite x.gateinsts warnings))
             ((mv warnings alwayses)
              (vl-alwayslist-oprewrite x.alwayses warnings))
             ((mv warnings initials)
              (vl-initiallist-oprewrite x.initials warnings)))
          (change-vl-module x
                            :assigns assigns
                            :modinsts modinsts
                            :gateinsts gateinsts
                            :alwayses alwayses
                            :initials initials
                            :warnings warnings))))

    Theorem: vl-module-p-of-vl-module-oprewrite

    (defthm vl-module-p-of-vl-module-oprewrite
      (b* ((new-x (vl-module-oprewrite x)))
        (vl-module-p new-x))
      :rule-classes :rewrite)

    Theorem: vl-module-oprewrite-of-vl-module-fix-x

    (defthm vl-module-oprewrite-of-vl-module-fix-x
      (equal (vl-module-oprewrite (vl-module-fix x))
             (vl-module-oprewrite x)))

    Theorem: vl-module-oprewrite-vl-module-equiv-congruence-on-x

    (defthm vl-module-oprewrite-vl-module-equiv-congruence-on-x
      (implies (vl-module-equiv x x-equiv)
               (equal (vl-module-oprewrite x)
                      (vl-module-oprewrite x-equiv)))
      :rule-classes :congruence)