• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
        • Mlib
        • Transforms
          • Unparameterization
          • Elaborate
          • Addnames
          • Annotate
            • Increment-elim
            • Make-implicit-wires
              • Shadowcheck
              • Implicit-wires-minutia
              • Implicit-wires-generate-scoping
              • Vl-genbase-make-implicit-wires
              • Vl-expr-names-for-implicit
              • Vl-make-implicit-wires-main
              • Vl-implicitst
              • Vl-make-port-implicit-wires
              • Vl-import-update-implicit
              • Vl-blockitemlist-update-implicit
              • Vl-blockitem-update-implicit
              • Vl-make-ordinary-implicit-wires
              • Vl-remove-declared-wires
                • Vl-implicitsts-restore-fast-alists
                • Vl-genblock-under-cond-make-implicit-wires
                • Vl-collect-exprs-for-implicit-wires-from-namedargs
                • Vl-genblock-make-implicit-wires
                • Vl-collect-exprs-for-implicit-wires-from-portargs
                • Vl-collect-exprs-for-implicit-wires-from-namedarg
                • Vl-gateinst-exprs-for-implicit-wires
                • Vl-modinst-exprs-for-implicit-wires
                • Vl-genelementlist-make-implicit-wires
                • Vl-packagemap-find-name
              • Basic-bind-elim
              • Argresolve
              • Basicsanity
              • Portdecl-sign
              • Enum-names
              • Port-resolve
              • Udp-elim
              • Vl-annotate-design
              • Vl-annotate-module
            • Clean-warnings
            • Eliminitial
            • Custom-transform-hooks
            • Problem-modules
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Make-implicit-wires

    Vl-remove-declared-wires

    Filter names to remove wires that are already declared. We remove the names of any port declarations, ordinary declarations, global names, and imported names.

    Signature
    (vl-remove-declared-wires names st) → implicit
    Arguments
    names — Guard (string-listp names).
    st — Guard (vl-implicitst-p st).
    Returns
    implicit — Subset of names that don't have declarations already, e.g., names that we want to add implicit declarations for.
        Type (string-listp implicit).

    Definitions and Theorems

    Function: vl-remove-declared-wires

    (defun vl-remove-declared-wires (names st)
      (declare (xargs :guard (and (string-listp names)
                                  (vl-implicitst-p st))))
      (let ((__function__ 'vl-remove-declared-wires))
        (declare (ignorable __function__))
        (b* (((when (atom names)) nil)
             ((vl-implicitst st))
             (name1 (string-fix (car names)))
             ((when (or (hons-get name1 st.decls)
                        (hons-get name1 st.portdecls)
                        (vl-packagemap-find-name name1 st.wildpkgs)
                        (vl-scopestack-find-item name1 st.ss)))
              (vl-remove-declared-wires (cdr names)
                                        st)))
          (cons name1
                (vl-remove-declared-wires (cdr names)
                                          st)))))

    Theorem: string-listp-of-vl-remove-declared-wires

    (defthm string-listp-of-vl-remove-declared-wires
      (b* ((implicit (vl-remove-declared-wires names st)))
        (string-listp implicit))
      :rule-classes :rewrite)

    Theorem: vl-remove-declared-wires-of-string-list-fix-names

    (defthm vl-remove-declared-wires-of-string-list-fix-names
      (equal (vl-remove-declared-wires (string-list-fix names)
                                       st)
             (vl-remove-declared-wires names st)))

    Theorem: vl-remove-declared-wires-string-list-equiv-congruence-on-names

    (defthm
         vl-remove-declared-wires-string-list-equiv-congruence-on-names
      (implies (str::string-list-equiv names names-equiv)
               (equal (vl-remove-declared-wires names st)
                      (vl-remove-declared-wires names-equiv st)))
      :rule-classes :congruence)

    Theorem: vl-remove-declared-wires-of-vl-implicitst-fix-st

    (defthm vl-remove-declared-wires-of-vl-implicitst-fix-st
      (equal (vl-remove-declared-wires names (vl-implicitst-fix st))
             (vl-remove-declared-wires names st)))

    Theorem: vl-remove-declared-wires-vl-implicitst-equiv-congruence-on-st

    (defthm
          vl-remove-declared-wires-vl-implicitst-equiv-congruence-on-st
      (implies (vl-implicitst-equiv st st-equiv)
               (equal (vl-remove-declared-wires names st)
                      (vl-remove-declared-wires names st-equiv)))
      :rule-classes :congruence)