• 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
          • 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
            • Edgesynth
            • Stmtrewrite
            • Cblock
            • Vl-always-convert-regports
            • Vl-always-convert-regs
            • Stmttemps
            • Edgesplit
            • Vl-always-check-reg
            • Vl-convert-regs
            • Latchsynth
            • Vl-always-check-regs
            • Vl-match-always-at-some-edges
            • Unelse
            • Vl-always-convert-reg
            • Vl-design-always-backend
            • Vl-stmt-guts
            • Vl-always-convert-regport
            • Vl-always-scary-regs
            • Eliminitial
            • Ifmerge
              • Vl-modulelist-ifmerge
              • Vl-stmt-ifmerge
                • Vl-stmtlist-ifmerge
              • Vl-alwayslist-ifmerge
              • Vl-always-ifmerge
              • Vl-module-ifmerge
              • Vl-design-ifmerge
            • Vl-edge-control-p
            • Elimalways
          • 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
  • Ifmerge

Vl-stmt-ifmerge

Main if-merging rewrite.

Signature
(vl-stmt-ifmerge x outer-cond warnings elem) 
  → 
(mv warnings flat-stmts)
Arguments
x — Statement to rewrite.
    Guard (vl-stmt-p x).
outer-cond — Initially nil, but becomes the merged outer-condition as we descend through ifs.
    Guard (or (not outer-cond) (and (vl-expr-p outer-cond) (posp (vl-expr->finalwidth outer-cond)) (equal (vl-expr->finaltype outer-cond) :vl-unsigned))) .
warnings — Guard (vl-warninglist-p warnings).
elem — Context for error messages.
    Guard (vl-modelement-p elem).
Returns
warnings — Type (vl-warninglist-p warnings).
flat-stmts — Type (vl-stmtlist-p flat-stmts).

Theorem: return-type-of-vl-stmt-ifmerge.warnings

(defthm return-type-of-vl-stmt-ifmerge.warnings
  (b* (((mv ?warnings ?flat-stmts)
        (vl-stmt-ifmerge x outer-cond warnings elem)))
    (vl-warninglist-p warnings))
  :rule-classes :rewrite)

Theorem: return-type-of-vl-stmt-ifmerge.flat-stmts

(defthm return-type-of-vl-stmt-ifmerge.flat-stmts
  (b* (((mv ?warnings ?flat-stmts)
        (vl-stmt-ifmerge x outer-cond warnings elem)))
    (vl-stmtlist-p flat-stmts))
  :rule-classes :rewrite)

Theorem: return-type-of-vl-stmtlist-ifmerge.warnings

(defthm return-type-of-vl-stmtlist-ifmerge.warnings
  (b* (((mv ?warnings ?flat-stmts)
        (vl-stmtlist-ifmerge x outer-cond warnings elem)))
    (vl-warninglist-p warnings))
  :rule-classes :rewrite)

Theorem: return-type-of-vl-stmtlist-ifmerge.flat-stmts

(defthm return-type-of-vl-stmtlist-ifmerge.flat-stmts
  (b* (((mv ?warnings ?flat-stmts)
        (vl-stmtlist-ifmerge x outer-cond warnings elem)))
    (vl-stmtlist-p flat-stmts))
  :rule-classes :rewrite)

Subtopics

Vl-stmtlist-ifmerge