• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
        • Lint
        • Mlib
          • Scopestack
          • Filtering-by-name
          • Vl-namefactory
          • Substitution
          • Allexprs
          • Hid-tools
            • Following-hids
              • Vl-follow-hidexpr
              • Vl-partselect-type-top-dimension-replacement
              • Vl-hidindex-datatype-resolve-dims
              • Vl-follow-hidexpr-error
              • Vl-follow-hidexpr-dimscheck
              • Vl-index-find-type
              • Vl-follow-hidexpr-dimcheck
              • Vl-partselect-expr-type
              • Vl-ss-find-hidexpr-range!!
              • Vl-hidstep
              • Vl-ss-find-hidexpr-range
              • Vl-genarrayblocklist-find-block
              • Vl-flatten-hidindex
                • Vl-flatten-hidindex-aux
                • Vl-hidexpr-resolved-p
                • Vl-flatten-hidexpr
                • Vl-hidindex-resolved-p
                • Vl-hidtrace
              • Vl-hidexpr-traverse-datatype
              • Abstract-hids
              • Vl-hidexpr-find-type
            • Vl-consteval
            • Range-tools
            • Lvalexprs
            • Hierarchy
            • Finding-by-name
            • Expr-tools
            • Expr-slicing
            • Stripping-functions
            • Stmt-tools
            • Modnamespace
            • Vl-parse-expr-from-str
            • Welltyped
            • Reordering-by-name
            • Flat-warnings
            • Genblob
            • Expr-building
            • Datatype-tools
            • Syscalls
            • Relocate
            • Expr-cleaning
            • Namemangle
            • Caremask
            • Port-tools
            • Lvalues
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-flatten-hidindex

    Vl-flatten-hidindex-aux

    Signature
    (vl-flatten-hidindex-aux indices acc) → new-acc
    Arguments
    indices — Guard (and (vl-exprlist-p indices) (vl-exprlist-resolved-p indices)).
    Returns
    new-acc — Type (character-listp new-acc), given (character-listp acc).

    Definitions and Theorems

    Function: vl-flatten-hidindex-aux

    (defun vl-flatten-hidindex-aux (indices acc)
     (declare (xargs :guard (and (vl-exprlist-p indices)
                                 (vl-exprlist-resolved-p indices))))
     (let ((__function__ 'vl-flatten-hidindex-aux))
      (declare (ignorable __function__))
      (b*
       (((when (atom indices)) acc)
        (acc (cons #\[ acc))
        (acc
           (revappend
                (str::nat-to-dec-chars (vl-resolved->val (car indices)))
                acc))
        (acc (cons #\] acc)))
       (vl-flatten-hidindex-aux (cdr indices)
                                acc))))

    Theorem: character-listp-of-vl-flatten-hidindex-aux

    (defthm character-listp-of-vl-flatten-hidindex-aux
      (implies (character-listp acc)
               (b* ((new-acc (vl-flatten-hidindex-aux indices acc)))
                 (character-listp new-acc)))
      :rule-classes :rewrite)