• 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
          • Scopestack
          • Hid-tools
            • Vl-follow-hidexpr
            • Vl-index-expr-typetrace
            • Vl-follow-scopeexpr
            • Vl-follow-hidexpr-dimscheck
            • Vl-datatype-resolve-selects
            • Vl-datatype-remove-dim
            • Vl-operandinfo
            • Vl-follow-hidexpr-dimcheck
            • Vl-follow-data-selects
            • Vl-follow-hidexpr-error
            • Vl-hidstep
            • Vl-scopestack-find-item/ss/path
            • Vl-follow-array-indices
            • Vl-scopecontext
            • Vl-datatype-set-unsigned
            • Vl-selstep
            • Vl-scopestack-find-elabpath
            • Vl-hid-prefix-for-subhid
            • Vl-find-structmember
            • Vl-select
            • Vl-scopeexpr-replace-hid
              • Vl-genblocklist-find-block
              • Vl-partselect-width
              • Vl-seltrace->indices
              • Vl-datatype->structmembers
              • Vl-hidexpr-resolved-p
              • Vl-operandinfo->indices
              • Vl-flatten-hidindex
              • Vl-subhid-p
              • Vl-seltrace-usertypes-ok
              • Vl-flatten-hidexpr
              • Vl-scopeexpr->hid
              • Vl-seltrace-index-count
              • Vl-operandinfo-usertypes-ok
              • Vl-operandinfo-index-count
              • Vl-datatype-dims-count
              • Vl-scopeexpr-index-count
              • Vl-hidexpr-index-count
              • Vl-usertype-lookup
              • Vl-hidindex-resolved-p
              • Vl-scopeexpr-resolved-p
              • Vl-selstep-usertypes-ok
              • Vl-hidtrace
              • Vl-seltrace
              • Vl-scopedef-interface-p
            • Filtering-by-name
            • Vl-interface-mocktype
            • Stripping-functions
            • Genblob
            • Expr-tools
            • Extract-vl-types
            • Hierarchy
            • Range-tools
            • Finding-by-name
            • Stmt-tools
            • Modnamespace
            • Flat-warnings
            • Reordering-by-name
            • Datatype-tools
            • Syscalls
            • Allexprs
            • Lvalues
            • Port-tools
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Hid-tools

    Vl-scopeexpr-replace-hid

    Replaces the hidexpr nested inside the scopeexpr.

    Signature
    (vl-scopeexpr-replace-hid x new-hid) → new-x
    Arguments
    x — Guard (vl-scopeexpr-p x).
    new-hid — Guard (vl-hidexpr-p new-hid).
    Returns
    new-x — Type (vl-scopeexpr-p new-x).

    Definitions and Theorems

    Function: vl-scopeexpr-replace-hid

    (defun vl-scopeexpr-replace-hid (x new-hid)
     (declare (xargs :guard (and (vl-scopeexpr-p x)
                                 (vl-hidexpr-p new-hid))))
     (let ((__function__ 'vl-scopeexpr-replace-hid))
      (declare (ignorable __function__))
      (vl-scopeexpr-case
         x
         :end (change-vl-scopeexpr-end x :hid new-hid)
         :colon (change-vl-scopeexpr-colon
                     x
                     :rest (vl-scopeexpr-replace-hid x.rest new-hid)))))

    Theorem: vl-scopeexpr-p-of-vl-scopeexpr-replace-hid

    (defthm vl-scopeexpr-p-of-vl-scopeexpr-replace-hid
      (b* ((new-x (vl-scopeexpr-replace-hid x new-hid)))
        (vl-scopeexpr-p new-x))
      :rule-classes :rewrite)

    Theorem: vl-scopeexpr-replace-hid-of-vl-scopeexpr-fix-x

    (defthm vl-scopeexpr-replace-hid-of-vl-scopeexpr-fix-x
      (equal (vl-scopeexpr-replace-hid (vl-scopeexpr-fix x)
                                       new-hid)
             (vl-scopeexpr-replace-hid x new-hid)))

    Theorem: vl-scopeexpr-replace-hid-vl-scopeexpr-equiv-congruence-on-x

    (defthm vl-scopeexpr-replace-hid-vl-scopeexpr-equiv-congruence-on-x
      (implies (vl-scopeexpr-equiv x x-equiv)
               (equal (vl-scopeexpr-replace-hid x new-hid)
                      (vl-scopeexpr-replace-hid x-equiv new-hid)))
      :rule-classes :congruence)

    Theorem: vl-scopeexpr-replace-hid-of-vl-hidexpr-fix-new-hid

    (defthm vl-scopeexpr-replace-hid-of-vl-hidexpr-fix-new-hid
      (equal (vl-scopeexpr-replace-hid x (vl-hidexpr-fix new-hid))
             (vl-scopeexpr-replace-hid x new-hid)))

    Theorem: vl-scopeexpr-replace-hid-vl-hidexpr-equiv-congruence-on-new-hid

    (defthm
        vl-scopeexpr-replace-hid-vl-hidexpr-equiv-congruence-on-new-hid
      (implies (vl-hidexpr-equiv new-hid new-hid-equiv)
               (equal (vl-scopeexpr-replace-hid x new-hid)
                      (vl-scopeexpr-replace-hid x new-hid-equiv)))
      :rule-classes :congruence)