• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
        • Symbolic-test-vectors
        • Esim-primitives
        • E-conversion
          • Vl-ealist-p
          • Modinsts-to-eoccs
          • Vl-module-make-esim
          • Exploding-vectors
            • Vl-wirealist-p
              • Vl-msb-expr-bitlist
              • Vl-plain-wire-name
              • Vl-module-wirealist
              • Vl-emodwires-from-high-to-low
              • Vl-vardecl-msb-emodwires
              • Vl-vardecllist-to-wirealist
                • Vl-emodwires-from-msb-to-lsb
                • Vl-verilogify-emodwirelist
              • Emodwire-encoding
              • Vl-emodwire-p
              • Vl-emodwirelistlist
              • Vl-emodwirelist
            • Resolving-multiple-drivers
            • Vl-modulelist-make-esims
            • Vl-module-check-e-ok
            • Vl-collect-design-wires
            • Adding-z-drivers
            • Vl-design-to-e
            • Vl-design-to-e-check-ports
            • Vl-design-to-e-main
            • Port-bit-checking
          • Esim-steps
          • Patterns
          • Mod-internal-paths
          • Defmodules
          • Esim-simplify-update-fns
          • Esim-tutorial
          • Esim-vl
        • Vl2014
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-wirealist-p

    Vl-vardecllist-to-wirealist

    Generate a (fast) wirealist from a vl-vardecllist-p.

    Signature
    (vl-vardecllist-to-wirealist x warnings) 
      → 
    (mv successp warnings wire-alist)
    Arguments
    x — Guard (vl-vardecllist-p x).
    warnings — Guard (vl-warninglist-p warnings).
    Returns
    successp — Type (booleanp successp).
    warnings — Type (vl-warninglist-p warnings).
    wire-alist — Type (vl-wirealist-p wire-alist).

    Definitions and Theorems

    Function: vl-vardecllist-to-wirealist

    (defun vl-vardecllist-to-wirealist (x warnings)
     (declare (xargs :guard (and (vl-vardecllist-p x)
                                 (vl-warninglist-p warnings))))
     (let ((__function__ 'vl-vardecllist-to-wirealist))
       (declare (ignorable __function__))
       (b* (((when (atom x)) (mv t (ok) nil))
            ((mv successp1 warnings wires1)
             (vl-vardecl-msb-emodwires (car x)
                                       warnings))
            ((mv successp2 warnings walist)
             (vl-vardecllist-to-wirealist (cdr x)
                                          warnings))
            (successp (and successp1 successp2))
            (walist (if successp1 (hons-acons (vl-vardecl->name (car x))
                                              wires1 walist)
                      walist)))
         (mv successp warnings walist))))

    Theorem: booleanp-of-vl-vardecllist-to-wirealist.successp

    (defthm booleanp-of-vl-vardecllist-to-wirealist.successp
      (b* (((mv ?successp ?warnings ?wire-alist)
            (vl-vardecllist-to-wirealist x warnings)))
        (booleanp successp))
      :rule-classes :type-prescription)

    Theorem: vl-warninglist-p-of-vl-vardecllist-to-wirealist.warnings

    (defthm vl-warninglist-p-of-vl-vardecllist-to-wirealist.warnings
      (b* (((mv ?successp ?warnings ?wire-alist)
            (vl-vardecllist-to-wirealist x warnings)))
        (vl-warninglist-p warnings))
      :rule-classes :rewrite)

    Theorem: vl-wirealist-p-of-vl-vardecllist-to-wirealist.wire-alist

    (defthm vl-wirealist-p-of-vl-vardecllist-to-wirealist.wire-alist
      (b* (((mv ?successp ?warnings ?wire-alist)
            (vl-vardecllist-to-wirealist x warnings)))
        (vl-wirealist-p wire-alist))
      :rule-classes :rewrite)

    Theorem: subsetp-equal-of-strip-cars-of-vl-vardecllist-to-wirealist

    (defthm subsetp-equal-of-strip-cars-of-vl-vardecllist-to-wirealist
     (subsetp-equal
          (strip-cars (mv-nth 2
                              (vl-vardecllist-to-wirealist x warnings)))
          (vl-vardecllist->names x)))