• 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-import-check-undeclared

    Signature
    (vl-import-check-undeclared x st warnings) 
      → 
    (mv new-warnings new-st)
    Arguments
    x — Guard (vl-import-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-import-check-undeclared

    (defun vl-import-check-undeclared (x st warnings)
     (declare (xargs :guard (and (vl-import-p x)
                                 (vl-implicitst-p st)
                                 (vl-warninglist-p warnings))))
     (let ((__function__ 'vl-import-check-undeclared))
      (declare (ignorable __function__))
      (b*
       (((vl-import x) (vl-import-fix x))
        (package
             (vl-scopestack-find-package x.pkg (vl-implicitst->ss st)))
        (warnings
         (if package (ok)
           (fatal
                :type :vl-bad-import
                :msg "~a0: trying to import from undefined package ~s1."
                :args (list x x.pkg))))
        (imports (vl-implicitst->imports st))
        (imports
             (if (eq x.part :vl-import*)
                 (hons-shrink-alist
                      (and package
                           (vl-package-scope-item-alist-top package))
                      imports)
               (hons-acons (the string x.part)
                           t imports)))
        (st (change-vl-implicitst st
                                  :imports imports)))
       (mv warnings st))))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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