• 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
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
        • Mlib
        • Transforms
          • Unparameterization
          • Elaborate
          • Addnames
          • Annotate
            • Increment-elim
            • Make-implicit-wires
            • Basic-bind-elim
            • Argresolve
              • Vl-convert-namedargs
              • Vl-unhierarchicalize-interfaceport
                • Vl-hidexpr-split-right
                • Vl-scopeexpr-split-right
                • Vl-interfacelist-argresolve
                • Vl-modulelist-argresolve
                • Vl-gateinst-dirassign
                • Vl-arguments-argresolve
                • Vl-unhierarchicalize-interfaceports
                • Vl-check-blankargs
                • Vl-annotate-plainargs
                • Vl-modinst-maybe-argresolve
                • Vl-modinst-argresolve
                • Vl-modinstlist-argresolve
                • Vl-gateinstlist-dirassign
                • Vl-interface-argresolve
                • Vl-module-argresolve
                • Vl-namedarglist-alist
                • Vl-make-namedarg-alist
                • Vl-design-argresolve
                • Vl-fast-find-namedarg
                • Vl-namedarg-alist
                • Vl-scopeitem-modport-p
                • Vl-scopeitem-modinst-p
                • Vl-scopeitem-interfaceport-p
                • Vl-port-interface-p
              • Basicsanity
              • Portdecl-sign
              • Enum-names
              • Port-resolve
              • Udp-elim
              • Vl-annotate-design
              • Vl-annotate-module
            • Clean-warnings
            • Eliminitial
            • Custom-transform-hooks
            • Problem-modules
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-unhierarchicalize-interfaceport

    Vl-scopeexpr-split-right

    Split off the rightmost part of a hierarchical scope expression.

    Signature
    (vl-scopeexpr-split-right x) 
      → 
    (mv successp prefix indices lastname)
    Arguments
    x — Guard (vl-scopeexpr-p x).
    Returns
    successp — Type (booleanp successp).
    prefix — Type (vl-scopeexpr-p prefix).
    indices — Type (vl-exprlist-p indices).
    lastname — Type (stringp lastname).

    This is a thin wrapper around vl-hidexpr-split-right that just sticks the scopes back on.

    Definitions and Theorems

    Function: vl-scopeexpr-split-right

    (defun vl-scopeexpr-split-right (x)
      (declare (xargs :guard (vl-scopeexpr-p x)))
      (let ((__function__ 'vl-scopeexpr-split-right))
        (declare (ignorable __function__))
        (vl-scopeexpr-case
             x :end
             (b* (((mv okp new-hid indices lastname)
                   (vl-hidexpr-split-right x.hid))
                  (new-x (change-vl-scopeexpr-end x
                                                  :hid new-hid)))
               (mv okp new-x indices lastname))
             :colon
             (b* (((mv okp new-rest indices lastname)
                   (vl-scopeexpr-split-right x.rest))
                  (new-x (change-vl-scopeexpr-colon x
                                                    :rest new-rest)))
               (mv okp new-x indices lastname)))))

    Theorem: booleanp-of-vl-scopeexpr-split-right.successp

    (defthm booleanp-of-vl-scopeexpr-split-right.successp
      (b* (((mv ?successp ?prefix ?indices ?lastname)
            (vl-scopeexpr-split-right x)))
        (booleanp successp))
      :rule-classes :rewrite)

    Theorem: vl-scopeexpr-p-of-vl-scopeexpr-split-right.prefix

    (defthm vl-scopeexpr-p-of-vl-scopeexpr-split-right.prefix
      (b* (((mv ?successp ?prefix ?indices ?lastname)
            (vl-scopeexpr-split-right x)))
        (vl-scopeexpr-p prefix))
      :rule-classes :rewrite)

    Theorem: vl-exprlist-p-of-vl-scopeexpr-split-right.indices

    (defthm vl-exprlist-p-of-vl-scopeexpr-split-right.indices
      (b* (((mv ?successp ?prefix ?indices ?lastname)
            (vl-scopeexpr-split-right x)))
        (vl-exprlist-p indices))
      :rule-classes :rewrite)

    Theorem: stringp-of-vl-scopeexpr-split-right.lastname

    (defthm stringp-of-vl-scopeexpr-split-right.lastname
      (b* (((mv ?successp ?prefix ?indices ?lastname)
            (vl-scopeexpr-split-right x)))
        (stringp lastname))
      :rule-classes :rewrite)

    Theorem: vl-scopeexpr-split-right-of-vl-scopeexpr-fix-x

    (defthm vl-scopeexpr-split-right-of-vl-scopeexpr-fix-x
      (equal (vl-scopeexpr-split-right (vl-scopeexpr-fix x))
             (vl-scopeexpr-split-right x)))

    Theorem: vl-scopeexpr-split-right-vl-scopeexpr-equiv-congruence-on-x

    (defthm vl-scopeexpr-split-right-vl-scopeexpr-equiv-congruence-on-x
      (implies (vl-scopeexpr-equiv x x-equiv)
               (equal (vl-scopeexpr-split-right x)
                      (vl-scopeexpr-split-right x-equiv)))
      :rule-classes :congruence)