• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
          • Vl-module
          • Vl-vardecl
          • Vl-fundecl
          • Vl-interface
          • Vl-design
          • Vl-assign
          • Vl-modinst
          • Vl-gateinst
          • Vl-taskdecl
          • Vl-portdecl
          • Vl-commentmap
          • Vl-dpiimport
          • Vl-ansi-portdecl
          • Vl-package
          • Vl-paramdecl
          • Vl-dpiexport
          • Vl-class
          • Vl-sort-blockitems-aux
          • Vl-plainarglist->exprs
          • Vl-taskdecllist->names
          • Expressions-and-datatypes
          • Vl-fundecllist->names
          • Vl-udp
          • Vl-port
          • Vl-genelement
          • Vl-clkdecl
          • Vl-parse-temps
          • Vl-bind
          • Vl-namedarg
          • Vl-exprdist
          • Vl-clkassign
          • Vl-range
          • Vl-propport
          • Vl-typedef
          • Vl-gatedelay
          • Vl-dimension
          • Vl-sequence
          • Vl-clkskew
          • Vl-program
          • Vl-gatestrength
          • Vl-property
          • Vl-config
          • Vl-always
          • Vl-import
          • Vl-repeateventcontrol
          • Vl-timeliteral
          • Vl-initial
          • Vl-eventcontrol
          • Vl-final
          • Vl-udpsymbol-p
          • Vl-maybe-clkskew
          • Vl-function-specialization
          • Vl-alias
          • Vl-maybe-nettypename
          • Vl-maybe-gatedelay
          • Vl-letdecl
          • Vl-direction-p
          • Vl-modelement
          • Vl-maybe-timeprecisiondecl
          • Vl-maybe-scopeid
          • Vl-maybe-gatestrength
          • Vl-maybe-direction
          • Vl-maybe-delayoreventcontrol
          • Vl-gclkdecl
          • Vl-fwdtypedef
          • Vl-maybe-udpsymbol-p
          • Vl-maybe-timeunitdecl
          • Vl-maybe-timeliteral
          • Vl-maybe-parse-temps
          • Vl-maybe-cstrength
          • Vl-arguments
          • Vl-maybe-module
          • Vl-maybe-design
          • Vl-covergroup
          • Vl-udpline
          • Vl-timeunitdecl
          • Vl-genvar
          • Vl-defaultdisable
          • Vl-context1
          • Vl-timeprecisiondecl
          • Vl-sort-blockitems
          • Vl-elabtask
          • Vl-udpedge
          • Vl-delaycontrol
          • Vl-context
          • Vl-ctxelement
          • Vl-ctxelement->loc
          • Vl-modelement->loc
          • Statements
          • Vl-blockitem
          • Vl-vardecllist
          • Vl-interface->ifports
          • Vl-syntaxversion
          • Vl-nettypename-p
          • Vl-module->ifports
          • Vl-lifetime-p
          • Vl-paramdecllist
          • Vl-modelementlist->genelements
          • Vl-importlist
          • Vl-typedeflist
          • Vl-gatetype-p
          • Vl-cstrength-p
          • Vl-port->name
          • Vl-genelement->loc
          • Vl-delayoreventcontrol
          • Vl-udpentry-p
          • Vl-portdecllist
          • Vl-elabtask->loc
          • Property-expressions
          • Vl-taskdecllist
          • Vl-port->loc
          • Vl-fundecllist
          • Vl-sequencelist
          • Vl-propertylist
          • Vl-portlist
          • Vl-dpiimportlist
          • Vl-dpiexportlist
          • Vl-classlist
          • Vl-arguments->args
          • Vl-alwaystype-p
          • Vl-modinstlist
          • Vl-importpart-p
          • Vl-importpart-fix
          • Vl-bindlist
          • Vl-initiallist
          • Vl-genvarlist
          • Vl-gclkdecllist
          • Vl-function-specialization-map
          • Vl-finallist
          • Vl-elabtasklist
          • Vl-defaultdisablelist
          • Vl-clkdecllist
          • Vl-cassertionlist
          • Vl-blockstmt-p
          • Vl-assignlist
          • Vl-assertionlist
          • Vl-alwayslist
          • Vl-aliaslist
          • Vl-udptable
          • Vl-udplist
            • Vl-udplist-fix
            • Vl-udplist-p
              • Vl-udplist-p-basics
              • Vl-udplist->names
              • Vl-find-udp
              • Vl-udplist-equiv
            • Vl-udpentrylist
            • Vl-propportlist
            • Vl-programlist
            • Vl-packagelist
            • Vl-namedarglist
            • Vl-modulelist
            • Vl-modportlist
            • Vl-modport-portlist
            • Vl-letdecllist
            • Vl-interfacelist
            • Vl-gateinstlist
            • Vl-fwdtypedeflist
            • Vl-covergrouplist
            • Vl-configlist
            • Vl-clkassignlist
            • Vl-blockitemlist
            • Vl-ansi-portdecllist
            • Vl-regularportlist
            • Vl-paramdecllist-list
            • Vl-modelementlist
            • Vl-interfaceportlist
            • Vl-casekey-p
            • Sv::maybe-4veclist
          • Loader
          • Warnings
          • Getting-started
          • Utilities
          • Printer
          • Kit
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Finding-by-name
    • Vl-udplist-p

    Vl-find-udp

    Naive, O(n) lookup of a vl-udp in a list by its name.

    Signature
    (vl-find-udp name x) → udp?
    Arguments
    name — Guard (stringp name).
    x — Guard (vl-udplist-p x).
    Returns
    udp? — Type (iff (vl-udp-p udp?) udp?).

    Definitions and Theorems

    Function: vl-find-udp

    (defun vl-find-udp (name x)
      (declare (xargs :guard (and (stringp name) (vl-udplist-p x))))
      (let ((__function__ 'vl-find-udp))
        (declare (ignorable __function__))
        (cond ((atom x) nil)
              ((equal (string-fix name)
                      (vl-udp->name (car x)))
               (vl-udp-fix (car x)))
              (t (vl-find-udp name (cdr x))))))

    Theorem: return-type-of-vl-find-udp

    (defthm return-type-of-vl-find-udp
      (b* ((udp? (vl-find-udp name x)))
        (iff (vl-udp-p udp?) udp?))
      :rule-classes :rewrite)

    Theorem: vl-find-udp-under-iff

    (defthm vl-find-udp-under-iff
      (iff (vl-find-udp name x)
           (member-equal (string-fix name)
                         (vl-udplist->names x))))

    Theorem: vl-udp->name-of-vl-find-udp

    (defthm vl-udp->name-of-vl-find-udp
      (implies (vl-find-udp name x)
               (equal (vl-udp->name (vl-find-udp name x))
                      (string-fix name))))

    Theorem: tag-of-vl-find-udp

    (defthm tag-of-vl-find-udp
      (equal (tag (vl-find-udp name x))
             (if (vl-find-udp name x) :vl-udp nil)))

    Theorem: member-equal-of-vl-find-udp

    (defthm member-equal-of-vl-find-udp
      (implies (force (vl-udplist-p x))
               (iff (member-equal (vl-find-udp name x) x)
                    (vl-find-udp name x))))

    Theorem: consp-of-vl-find-udp-when-member-equal

    (defthm consp-of-vl-find-udp-when-member-equal
      (implies (and (member-equal name (vl-udplist->names x))
                    (force (stringp name)))
               (consp (vl-find-udp name x))))

    Theorem: vl-find-udp-of-str-fix-name

    (defthm vl-find-udp-of-str-fix-name
      (equal (vl-find-udp (str-fix name) x)
             (vl-find-udp name x)))

    Theorem: vl-find-udp-streqv-congruence-on-name

    (defthm vl-find-udp-streqv-congruence-on-name
      (implies (streqv name name-equiv)
               (equal (vl-find-udp name x)
                      (vl-find-udp name-equiv x)))
      :rule-classes :congruence)

    Theorem: vl-find-udp-of-vl-udplist-fix-x

    (defthm vl-find-udp-of-vl-udplist-fix-x
      (equal (vl-find-udp name (vl-udplist-fix x))
             (vl-find-udp name x)))

    Theorem: vl-find-udp-vl-udplist-equiv-congruence-on-x

    (defthm vl-find-udp-vl-udplist-equiv-congruence-on-x
      (implies (vl-udplist-equiv x x-equiv)
               (equal (vl-find-udp name x)
                      (vl-find-udp name x-equiv)))
      :rule-classes :congruence)