• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • 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
          • Gatesplit
          • Gate-elim
          • Expression-optimization
          • Elim-supplies
          • Wildelim
          • Drop-blankports
          • Clean-warnings
          • Addinstnames
          • Custom-transform-hooks
          • Annotate
            • Make-implicit-wires
              • Vl-modulelist-make-implicit-wires
              • Vl-make-implicit-wires-aux
              • Shadowcheck
              • Vl-stmt-check-undeclared
              • Vl-make-implicit-wires-main
              • Vl-fundecl-check-undeclared
              • Vl-warn-about-undeclared-wires
              • Vl-implicitst
              • Vl-blockitem-check-undeclared
                • Vl-taskdecl-check-undeclared
                • Vl-modinst-exprs-for-implicit-wires
                • Vl-blockitemlist-check-undeclared
                • Vl-import-check-undeclared
                • Vl-make-ordinary-implicit-wires
                • Vl-gateinst-exprs-for-implicit-wires
                • Vl-remove-declared-wires
                • Vl-make-port-implicit-wires
                • Vl-module-make-implicit-wires
                • Vl-vardecl-exprs-for-implicit-wires
                • Vl-design-make-implicit-wires
              • Resolve-indexing
              • Origexprs
              • Argresolve
              • Portdecl-sign
              • Designwires
              • Udp-elim
              • Vl-annotate-design
            • 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
    • Make-implicit-wires

    Vl-blockitem-check-undeclared

    Check for undeclared wires in an arbitrary vl-blockitem-p, and extends decls with the newly declared name.

    Signature
    (vl-blockitem-check-undeclared x st warnings) 
      → 
    (mv new-warnings new-st)
    Arguments
    x — Arbitrary block item to process.
        Guard (vl-blockitem-p x).
    st — Guard (vl-implicitst-p st).
    warnings — Guard (vl-warninglist-p warnings).
    Returns
    new-warnings — Type (vl-warninglist-p new-warnings).
    new-st — Type (vl-implicitst-p new-st).

    Definitions and Theorems

    Function: vl-blockitem-check-undeclared

    (defun vl-blockitem-check-undeclared (x st warnings)
     (declare (xargs :guard (and (vl-blockitem-p x)
                                 (vl-implicitst-p st)
                                 (vl-warninglist-p warnings))))
     (let ((__function__ 'vl-blockitem-check-undeclared))
      (declare (ignorable __function__))
      (b*
       ((x (vl-blockitem-fix x))
        ((when (eq (tag x) :vl-import))
         (vl-import-check-undeclared x st warnings))
        ((mv name exprs)
         (case
              (tag x)
              (:vl-vardecl (mv (vl-vardecl->name x)
                               (vl-vardecl-exprs-for-implicit-wires x)))
              (otherwise (mv (vl-paramdecl->name x)
                             (vl-paramdecl-allexprs x)))))
        (used-names (vl-exprlist-varnames exprs))
        (warnings
             (vl-warn-about-undeclared-wires x used-names st warnings))
        (decls (hons-acons name nil (vl-implicitst->decls st)))
        (st (change-vl-implicitst st :decls decls)))
       (mv warnings st))))

    Theorem: vl-warninglist-p-of-vl-blockitem-check-undeclared.new-warnings

    (defthm
         vl-warninglist-p-of-vl-blockitem-check-undeclared.new-warnings
      (b* (((mv ?new-warnings ?new-st)
            (vl-blockitem-check-undeclared x st warnings)))
        (vl-warninglist-p new-warnings))
      :rule-classes :rewrite)

    Theorem: vl-implicitst-p-of-vl-blockitem-check-undeclared.new-st

    (defthm vl-implicitst-p-of-vl-blockitem-check-undeclared.new-st
      (b* (((mv ?new-warnings ?new-st)
            (vl-blockitem-check-undeclared x st warnings)))
        (vl-implicitst-p new-st))
      :rule-classes :rewrite)

    Theorem: vl-blockitem-check-undeclared-of-vl-blockitem-fix-x

    (defthm vl-blockitem-check-undeclared-of-vl-blockitem-fix-x
      (equal (vl-blockitem-check-undeclared (vl-blockitem-fix x)
                                            st warnings)
             (vl-blockitem-check-undeclared x st warnings)))

    Theorem: vl-blockitem-check-undeclared-vl-blockitem-equiv-congruence-on-x

    (defthm
       vl-blockitem-check-undeclared-vl-blockitem-equiv-congruence-on-x
      (implies
           (vl-blockitem-equiv x x-equiv)
           (equal (vl-blockitem-check-undeclared x st warnings)
                  (vl-blockitem-check-undeclared x-equiv st warnings)))
      :rule-classes :congruence)

    Theorem: vl-blockitem-check-undeclared-of-vl-implicitst-fix-st

    (defthm vl-blockitem-check-undeclared-of-vl-implicitst-fix-st
      (equal (vl-blockitem-check-undeclared x (vl-implicitst-fix st)
                                            warnings)
             (vl-blockitem-check-undeclared x st warnings)))

    Theorem: vl-blockitem-check-undeclared-vl-implicitst-equiv-congruence-on-st

    (defthm
     vl-blockitem-check-undeclared-vl-implicitst-equiv-congruence-on-st
     (implies
          (vl-implicitst-equiv st st-equiv)
          (equal (vl-blockitem-check-undeclared x st warnings)
                 (vl-blockitem-check-undeclared x st-equiv warnings)))
     :rule-classes :congruence)

    Theorem: vl-blockitem-check-undeclared-of-vl-warninglist-fix-warnings

    (defthm vl-blockitem-check-undeclared-of-vl-warninglist-fix-warnings
     (equal
      (vl-blockitem-check-undeclared x st (vl-warninglist-fix warnings))
      (vl-blockitem-check-undeclared x st warnings)))

    Theorem: vl-blockitem-check-undeclared-vl-warninglist-equiv-congruence-on-warnings

    (defthm
     vl-blockitem-check-undeclared-vl-warninglist-equiv-congruence-on-warnings
     (implies
          (vl-warninglist-equiv warnings warnings-equiv)
          (equal (vl-blockitem-check-undeclared x st warnings)
                 (vl-blockitem-check-undeclared x st warnings-equiv)))
     :rule-classes :congruence)