• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
        • Svex-fixpoint-decomposition-methodology
        • Sv-versus-esim
        • Svex-decomp
        • Svex-compose-dfs
        • Moddb
          • Moddb.lisp
          • Elab-mod
          • Moddb-path->wireidx/decl
          • Moddb-wireidx->path/decl
          • Moddb-path->wireidx
          • Moddb-address->wireidx
          • Moddb-address->wiredecl
            • Moddb-wireidx->path
            • Modscope-okp
          • Svex-compilation
          • Svmods
          • Svstmt
          • Sv-tutorial
          • Expressions
          • Symbolic-test-vector
          • Vl-to-svex
        • Vwsim
        • Fgl
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Testing-utilities
      • Math
    • Moddb

    Moddb-address->wiredecl

    Given a wire address, find the corresponding wire declaration.

    Signature
    (moddb-address->wiredecl addr scope moddb) → wire
    Arguments
    addr — Guard (address-p addr).
    scope — Guard (modscope-p scope).
    moddb — Guard (moddb-ok moddb).
    Returns
    wire — Type (iff (wire-p wire) wire).

    Definitions and Theorems

    Function: moddb-address->wiredecl

    (defun
     moddb-address->wiredecl
     (addr scope moddb)
     (declare (xargs :stobjs (moddb)))
     (declare (xargs :guard (and (address-p addr)
                                 (modscope-p scope)
                                 (moddb-ok moddb))))
     (declare (xargs :guard (modscope-okp scope moddb)))
     (let
       ((__function__ 'moddb-address->wiredecl))
       (declare (ignorable __function__))
       (b* (((address addr))
            ((modscope scope1)
             (if (eq addr.scope :root)
                 (modscope->top scope)
                 (modscope->nth addr.scope scope)))
            (wire (moddb-path->wiredecl addr.path scope1.modidx moddb)))
           wire)))

    Theorem: return-type-of-moddb-address->wiredecl

    (defthm return-type-of-moddb-address->wiredecl
            (b* ((wire (moddb-address->wiredecl addr scope moddb)))
                (iff (wire-p wire) wire))
            :rule-classes :rewrite)

    Theorem: moddb-address->wiredecl-iff-wireidx

    (defthm moddb-address->wiredecl-iff-wireidx
            (iff (moddb-address->wiredecl addr scope moddb)
                 (moddb-address->wireidx addr scope moddb)))

    Theorem: moddb-address->wiredecl-of-address-fix-addr

    (defthm moddb-address->wiredecl-of-address-fix-addr
            (equal (moddb-address->wiredecl (address-fix addr)
                                            scope moddb)
                   (moddb-address->wiredecl addr scope moddb)))

    Theorem: moddb-address->wiredecl-address-equiv-congruence-on-addr

    (defthm
      moddb-address->wiredecl-address-equiv-congruence-on-addr
      (implies (address-equiv addr addr-equiv)
               (equal (moddb-address->wiredecl addr scope moddb)
                      (moddb-address->wiredecl addr-equiv scope moddb)))
      :rule-classes :congruence)

    Theorem: moddb-address->wiredecl-of-modscope-fix-scope

    (defthm moddb-address->wiredecl-of-modscope-fix-scope
            (equal (moddb-address->wiredecl addr (modscope-fix scope)
                                            moddb)
                   (moddb-address->wiredecl addr scope moddb)))

    Theorem: moddb-address->wiredecl-modscope-equiv-congruence-on-scope

    (defthm
      moddb-address->wiredecl-modscope-equiv-congruence-on-scope
      (implies (modscope-equiv scope scope-equiv)
               (equal (moddb-address->wiredecl addr scope moddb)
                      (moddb-address->wiredecl addr scope-equiv moddb)))
      :rule-classes :congruence)

    Theorem: moddb-address->wiredecl-of-moddb-fix-moddb

    (defthm
         moddb-address->wiredecl-of-moddb-fix-moddb
         (equal (moddb-address->wiredecl addr scope (moddb-fix moddb))
                (moddb-address->wiredecl addr scope moddb)))

    Theorem: moddb-address->wiredecl-moddb-equiv-congruence-on-moddb

    (defthm
      moddb-address->wiredecl-moddb-equiv-congruence-on-moddb
      (implies (moddb-equiv moddb moddb-equiv)
               (equal (moddb-address->wiredecl addr scope moddb)
                      (moddb-address->wiredecl addr scope moddb-equiv)))
      :rule-classes :congruence)