• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
        • Svex-decomposition-methodology
        • Sv-versus-esim
        • Svex-decomp
        • Svex-compose-dfs
        • Svex-compilation
        • Moddb
        • Svmods
          • Address
          • Wire
            • Wire-fix
            • Wire-p
            • Make-wire
            • Wire-equiv
            • Change-wire
            • Wire->name
            • Wire->low-idx
            • Wire->delay
            • Wire->width
            • Wire->type
            • Wire->atts
            • Wirelist
              • Wirelist-fix
              • Wirelist->names
              • Wirelist-p
              • Wirelist-find
                • Wirelist-equiv
              • Wire->revp
              • Wiretype
            • Module
            • Lhs
            • Path
            • Svar-add-namespace
            • Design
            • Modinst
            • Lhs-add-namespace
            • Modalist
            • Path-add-namespace
            • Modname->submodnames
            • Name
            • Constraintlist-addr-p
            • Svex-alist-addr-p
            • Svar-map-addr-p
            • Lhspairs-addr-p
            • Modname
            • Assigns-addr-p
            • Lhs-addr-p
            • Lhatom-addr-p
            • Modhier-list-measure
            • Attributes
            • Modhier-measure
            • Modhier-list-measure-aux
            • Modhier-loopfreelist-p
            • Modhier-loopfree-p
          • Svstmt
          • Sv-tutorial
          • Expressions
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Wirelist

    Wirelist-find

    (wirelist-find name x) searches for a name in a wirelist.

    Signature
    (wirelist-find name x) → wire
    Arguments
    name — Guard (name-p name).
    x — Guard (wirelist-p x).
    Returns
    wire — Type (iff (wire-p wire) wire).

    Definitions and Theorems

    Function: wirelist-find

    (defun wirelist-find (name x)
      (declare (xargs :guard (and (name-p name) (wirelist-p x))))
      (let ((__function__ 'wirelist-find))
        (declare (ignorable __function__))
        (cond ((atom x) nil)
              ((equal (wire->name (car x))
                      (name-fix name))
               (wire-fix (car x)))
              (t (wirelist-find name (cdr x))))))

    Theorem: return-type-of-wirelist-find

    (defthm return-type-of-wirelist-find
      (b* ((wire (wirelist-find name x)))
        (iff (wire-p wire) wire))
      :rule-classes :rewrite)

    Theorem: wirelist-find-of-name-fix-name

    (defthm wirelist-find-of-name-fix-name
      (equal (wirelist-find (name-fix name) x)
             (wirelist-find name x)))

    Theorem: wirelist-find-name-equiv-congruence-on-name

    (defthm wirelist-find-name-equiv-congruence-on-name
      (implies (name-equiv name name-equiv)
               (equal (wirelist-find name x)
                      (wirelist-find name-equiv x)))
      :rule-classes :congruence)

    Theorem: wirelist-find-of-wirelist-fix-x

    (defthm wirelist-find-of-wirelist-fix-x
      (equal (wirelist-find name (wirelist-fix x))
             (wirelist-find name x)))

    Theorem: wirelist-find-wirelist-equiv-congruence-on-x

    (defthm wirelist-find-wirelist-equiv-congruence-on-x
      (implies (wirelist-equiv x x-equiv)
               (equal (wirelist-find name x)
                      (wirelist-find name x-equiv)))
      :rule-classes :congruence)