• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • 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-hidexpr-traverse-datatype
            • Abstract-hids
              • Vl-hidexpr-p
              • Vl-hidindex-p
              • Vl-hidexpr-collect-indices
              • Vl-hidindex->indices
              • Vl-hidexpr->rest
              • Vl-indexexpr->indices
                • Vl-indexexpr->indices-exec
                • Vl-hidexpr->first
                • Vl-indexexpr->scopeexpr
                • Vl-scopeexpr->scopes
                • Vl-hidname-p
                • Vl-hidexpr->endp
                • Vl-scopeexpr->hid
                • Vl-hidname->name
                • Vl-hidindex->name
                • Vl-hidindex-count-indices
                • Vl-scopeexpr-p
                • Vl-scopeatom->name
                • Vl-scopename-p
                • Vl-scopename-fix
                • Vl-indexexpr-p
                • Vl-fast-keyguts-p
                • Vl-scopeatom-p
                • Vl-scopenamelist
              • 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-indexexpr->indices

    Vl-indexexpr->indices-exec

    Signature
    (vl-indexexpr->indices-exec x acc) → indices
    Arguments
    x — Guard (vl-expr-p x).
    acc — Guard (vl-exprlist-p acc).
    Returns
    indices — Type (vl-exprlist-p indices).

    Definitions and Theorems

    Function: vl-indexexpr->indices-exec

    (defun vl-indexexpr->indices-exec (x acc)
     (declare (xargs :guard (and (vl-expr-p x)
                                 (vl-exprlist-p acc))))
     (declare (xargs :guard (vl-indexexpr-p x)))
     (let ((__function__ 'vl-indexexpr->indices-exec))
      (declare (ignorable __function__))
      (b*
       ((acc (vl-exprlist-fix acc))
        ((when (vl-atom-p x)) acc)
        ((vl-nonatom x) x)
        ((when (or (vl-op-equiv x.op :vl-index)
                   (vl-op-equiv x.op :vl-bitselect)))
         (vl-indexexpr->indices-exec (first x.args)
                                     (cons (vl-expr-fix (second x.args))
                                           acc))))
       acc)))

    Theorem: vl-exprlist-p-of-vl-indexexpr->indices-exec

    (defthm vl-exprlist-p-of-vl-indexexpr->indices-exec
      (b* ((indices (vl-indexexpr->indices-exec x acc)))
        (vl-exprlist-p indices))
      :rule-classes :rewrite)

    Theorem: vl-indexexpr->indices-exec-of-vl-expr-fix-x

    (defthm vl-indexexpr->indices-exec-of-vl-expr-fix-x
      (equal (vl-indexexpr->indices-exec (vl-expr-fix x)
                                         acc)
             (vl-indexexpr->indices-exec x acc)))

    Theorem: vl-indexexpr->indices-exec-vl-expr-equiv-congruence-on-x

    (defthm vl-indexexpr->indices-exec-vl-expr-equiv-congruence-on-x
      (implies (vl-expr-equiv x x-equiv)
               (equal (vl-indexexpr->indices-exec x acc)
                      (vl-indexexpr->indices-exec x-equiv acc)))
      :rule-classes :congruence)

    Theorem: vl-indexexpr->indices-exec-of-vl-exprlist-fix-acc

    (defthm vl-indexexpr->indices-exec-of-vl-exprlist-fix-acc
      (equal (vl-indexexpr->indices-exec x (vl-exprlist-fix acc))
             (vl-indexexpr->indices-exec x acc)))

    Theorem: vl-indexexpr->indices-exec-vl-exprlist-equiv-congruence-on-acc

    (defthm
         vl-indexexpr->indices-exec-vl-exprlist-equiv-congruence-on-acc
      (implies (vl-exprlist-equiv acc acc-equiv)
               (equal (vl-indexexpr->indices-exec x acc)
                      (vl-indexexpr->indices-exec x acc-equiv)))
      :rule-classes :congruence)