• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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-flatten-hidindex-aux
            • 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-flatten-hidindex

Converts a vl-hidindex-p into a string like "bar[3][4][5]".

Signature
(vl-flatten-hidindex x) → flat-string
Arguments
x — Guard (vl-hidindex-p x).
Returns
flat-string — Type (stringp flat-string).

Definitions and Theorems

Function: vl-flatten-hidindex

(defun vl-flatten-hidindex (x)
  (declare (xargs :guard (vl-hidindex-p x)))
  (declare (xargs :guard (vl-hidindex-resolved-p x)))
  (let ((__function__ 'vl-flatten-hidindex))
    (declare (ignorable __function__))
    (b* ((name (vl-hidindex->name x))
         (name (if (eq name :vl-$root) "$root" name))
         (indices (vl-hidindex->indices x))
         ((when (atom indices)) name)
         (acc nil)
         (acc (str::revappend-chars name acc))
         (acc (vl-flatten-hidindex-aux indices acc)))
      (str::rchars-to-string acc))))

Theorem: stringp-of-vl-flatten-hidindex

(defthm stringp-of-vl-flatten-hidindex
  (b* ((flat-string (vl-flatten-hidindex x)))
    (stringp flat-string))
  :rule-classes :type-prescription)

Theorem: vl-flatten-hidindex-of-vl-hidindex-fix-x

(defthm vl-flatten-hidindex-of-vl-hidindex-fix-x
  (equal (vl-flatten-hidindex (vl-hidindex-fix x))
         (vl-flatten-hidindex x)))

Theorem: vl-flatten-hidindex-vl-hidindex-equiv-congruence-on-x

(defthm vl-flatten-hidindex-vl-hidindex-equiv-congruence-on-x
  (implies (vl-hidindex-equiv x x-equiv)
           (equal (vl-flatten-hidindex x)
                  (vl-flatten-hidindex x-equiv)))
  :rule-classes :congruence)

Subtopics

Vl-flatten-hidindex-aux