• 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-resolved->val

    Get the value from a resolved expression.

    Signature
    (vl-resolved->val x) → val
    Arguments
    x — Guard (vl-expr-p x).
    Returns
    val — Type (integerp val).

    Definitions and Theorems

    Function: vl-resolved->val

    (defun vl-resolved->val (x)
           (declare (xargs :guard (vl-expr-p x)))
           (declare (xargs :guard (vl-expr-resolved-p x)))
           (let ((__function__ 'vl-resolved->val))
                (declare (ignorable __function__))
                (b* (((vl-constint x) (vl-literal->val x)))
                    (if (eq x.origsign :vl-signed)
                        (acl2::logext x.origwidth x.value)
                        x.value))))

    Theorem: integerp-of-vl-resolved->val

    (defthm integerp-of-vl-resolved->val
            (b* ((val (vl-resolved->val x)))
                (integerp val))
            :rule-classes :type-prescription)

    Theorem: vl-resolved->val-of-vl-expr-fix-x

    (defthm vl-resolved->val-of-vl-expr-fix-x
            (equal (vl-resolved->val (vl-expr-fix x))
                   (vl-resolved->val x)))

    Theorem: vl-resolved->val-vl-expr-equiv-congruence-on-x

    (defthm vl-resolved->val-vl-expr-equiv-congruence-on-x
            (implies (vl-expr-equiv x x-equiv)
                     (equal (vl-resolved->val x)
                            (vl-resolved->val x-equiv)))
            :rule-classes :congruence)