• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Vwsim
      • Fgl
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
        • Mlib
          • Scopestack
          • Hid-tools
          • Filtering-by-name
          • Vl-interface-mocktype
          • Stripping-functions
          • Genblob
          • Expr-tools
            • Vl-expr-typedecide
            • Vl-exprlist-resolved->vals
            • Vl-make-idexpr-list
            • Vl-idexprlist->names
            • Vl-expr-selfsize
            • Vl-expr-update-subexprs
            • Vl-exprlist-to-plainarglist
            • Vl-op-p
            • Vl-call-namedargs-update-subexprs
            • Vl-valuerangelist-update-subexprs
            • Vl-streamexprlist-update-subexprs
            • Vl-maybe-exprlist-update-subexprs
            • Vl-expr-values
            • Vl-evatomlist-update-subexprs
            • Vl-keyvallist-update-subexprs
            • Vl-assignpat-update-subexprs
            • Vl-valuerange-update-subexprs
            • Vl-streamexpr-update-subexprs
            • Vl-scopeexpr-update-subexprs
            • Vl-patternkey-update-subexprs
            • Vl-partselect-update-subexprs
            • Vl-hidexpr-update-subexprs
            • Vl-expr-ops
            • Vl-arrayrange-update-subexprs
            • Vl-slicesize-update-subexprs
            • Vl-plusminus-update-subexprs
            • Vl-expr-add-atts
            • Vl-make-integer
            • Vl-range-update-subexprs
            • Vl-idexpr
              • Vl-make-index
              • Vl-bitlist-from-nat
              • Vl-expr->subexprs
              • Vl-pps-expr
              • Vl-evatomlist->subexprs
              • Vl-call-namedargs->subexprs
              • Vl-valuerangelist->subexprs
              • Vl-streamexprlist->subexprs
              • Vl-maybe-exprlist->subexprs
              • Vl-hidexpr->subexprs
              • Vl-expr-resolved-p
              • Vl-valuerange->subexprs
              • Vl-streamexpr->subexprs
              • Vl-patternkey->subexprs
              • Vl-partselect->subexprs
              • Vl-keyvallist->subexprs
              • Vl-exprlist-has-ops
              • Vl-assignpat->subexprs
              • Vl-arrayrange->subexprs
              • Vl-slicesize->subexprs
              • Vl-scopeexpr->subexprs
              • Vl-plusminus->subexprs
              • Vl-expr-has-ops
              • Vl-resolved->val
              • Vl-range->subexprs
              • Vl-pps-origexpr
              • Vl-idscope
              • Vl-idexpr->name
              • Vl-idexpr-p
              • Vl-idexprlist-p
              • Vl-exprlist-resolved-p
              • Vl-idscope->name
              • Vl-idscope-p
              • Vl-zbitlist-p
              • Vl-zatom-p
              • Vl-op-fix
              • Vl-oplist
              • Vl-expr-varnames
              • Vl-one-bit-constants
            • Hierarchy
            • Extract-vl-types
            • 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
      • Testing-utilities
      • Math
    • Expr-tools

    Vl-idexpr

    Construct an vl-idexpr-p.

    Signature
    (vl-idexpr name) → expr
    Arguments
    name — Guard (stringp name).
    Returns
    expr — Type (vl-expr-p expr).

    (vl-idexpr name) constructs a simple identifier expression with the given name, width, and type.

    I didn't always hons these, but now it seems like a good idea since the same identifier may be needed in several contexts, and since we often want to construct fast alists binding identifiers to things, etc.

    Definitions and Theorems

    Function: vl-idexpr$inline

    (defun
      vl-idexpr$inline (name)
      (declare (xargs :guard (stringp name)))
      (let ((__function__ 'vl-idexpr))
           (declare (ignorable __function__))
           (hons-copy (make-vl-index :scope (vl-idscope name)
                                     :indices nil
                                     :part (make-vl-partselect-none)))))

    Theorem: vl-expr-p-of-vl-idexpr

    (defthm vl-expr-p-of-vl-idexpr
            (b* ((expr (vl-idexpr$inline name)))
                (vl-expr-p expr))
            :rule-classes :rewrite)

    Theorem: vl-idexpr-p-of-vl-idexpr

    (defthm vl-idexpr-p-of-vl-idexpr
            (vl-idexpr-p (vl-idexpr name)))

    Theorem: vl-idexpr->name-of-vl-idexpr

    (defthm vl-idexpr->name-of-vl-idexpr
            (equal (vl-idexpr->name (vl-idexpr name))
                   (str-fix name)))

    Theorem: vl-expr-kind-of-vl-idexpr

    (defthm vl-expr-kind-of-vl-idexpr
            (equal (vl-expr-kind (vl-idexpr name))
                   :vl-index))

    Theorem: vl-idexpr$inline-of-str-fix-name

    (defthm vl-idexpr$inline-of-str-fix-name
            (equal (vl-idexpr$inline (str-fix name))
                   (vl-idexpr$inline name)))

    Theorem: vl-idexpr$inline-streqv-congruence-on-name

    (defthm vl-idexpr$inline-streqv-congruence-on-name
            (implies (streqv name name-equiv)
                     (equal (vl-idexpr$inline name)
                            (vl-idexpr$inline name-equiv)))
            :rule-classes :congruence)