• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • 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-expr-add-atts

    Signature
    (vl-expr-add-atts new-atts x) → new-x
    Arguments
    new-atts — Guard (vl-atts-p new-atts).
    x — Guard (vl-expr-p x).
    Returns
    new-x — Type (vl-expr-p new-x).

    Definitions and Theorems

    Function: vl-expr-add-atts

    (defun
     vl-expr-add-atts (new-atts x)
     (declare (xargs :guard (and (vl-atts-p new-atts)
                                 (vl-expr-p x))))
     (let
      ((__function__ 'vl-expr-add-atts))
      (declare (ignorable __function__))
      (vl-expr-case
        x
        :vl-special
        (change-vl-special x
                           :atts (append-without-guard new-atts x.atts))
        :vl-literal
        (change-vl-literal x
                           :atts (append-without-guard new-atts x.atts))
        :vl-index
        (change-vl-index x
                         :atts (append-without-guard new-atts x.atts))
        :vl-unary
        (change-vl-unary x
                         :atts (append-without-guard new-atts x.atts))
        :vl-binary
        (change-vl-binary x
                          :atts (append-without-guard new-atts x.atts))
        :vl-qmark
        (change-vl-qmark x
                         :atts (append-without-guard new-atts x.atts))
        :vl-mintypmax (change-vl-mintypmax
                           x
                           :atts (append-without-guard new-atts x.atts))
        :vl-concat
        (change-vl-concat x
                          :atts (append-without-guard new-atts x.atts))
        :vl-multiconcat
        (change-vl-multiconcat
             x
             :atts (append-without-guard new-atts x.atts))
        :vl-stream
        (change-vl-stream x
                          :atts (append-without-guard new-atts x.atts))
        :vl-call
        (change-vl-call x
                        :atts (append-without-guard new-atts x.atts))
        :vl-cast
        (change-vl-cast x
                        :atts (append-without-guard new-atts x.atts))
        :vl-inside
        (change-vl-inside x
                          :atts (append-without-guard new-atts x.atts))
        :vl-tagged
        (change-vl-tagged x
                          :atts (append-without-guard new-atts x.atts))
        :vl-pattern
        (change-vl-pattern x
                           :atts (append-without-guard new-atts x.atts))
        :vl-eventexpr
        (change-vl-eventexpr
             x
             :atts (append-without-guard new-atts x.atts)))))

    Theorem: vl-expr-p-of-vl-expr-add-atts

    (defthm vl-expr-p-of-vl-expr-add-atts
            (b* ((new-x (vl-expr-add-atts new-atts x)))
                (vl-expr-p new-x))
            :rule-classes :rewrite)

    Theorem: vl-expr-add-atts-of-vl-atts-fix-new-atts

    (defthm vl-expr-add-atts-of-vl-atts-fix-new-atts
            (equal (vl-expr-add-atts (vl-atts-fix new-atts)
                                     x)
                   (vl-expr-add-atts new-atts x)))

    Theorem: vl-expr-add-atts-vl-atts-equiv-congruence-on-new-atts

    (defthm vl-expr-add-atts-vl-atts-equiv-congruence-on-new-atts
            (implies (vl-atts-equiv new-atts new-atts-equiv)
                     (equal (vl-expr-add-atts new-atts x)
                            (vl-expr-add-atts new-atts-equiv x)))
            :rule-classes :congruence)

    Theorem: vl-expr-add-atts-of-vl-expr-fix-x

    (defthm vl-expr-add-atts-of-vl-expr-fix-x
            (equal (vl-expr-add-atts new-atts (vl-expr-fix x))
                   (vl-expr-add-atts new-atts x)))

    Theorem: vl-expr-add-atts-vl-expr-equiv-congruence-on-x

    (defthm vl-expr-add-atts-vl-expr-equiv-congruence-on-x
            (implies (vl-expr-equiv x x-equiv)
                     (equal (vl-expr-add-atts new-atts x)
                            (vl-expr-add-atts new-atts x-equiv)))
            :rule-classes :congruence)