• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • 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
          • Vl-consteval
          • Range-tools
          • Lvalexprs
          • Hierarchy
          • Finding-by-name
          • Expr-tools
          • Expr-slicing
          • Stripping-functions
            • Vl-plainarglist-strip
            • Vl-namedarglist-strip
            • Vl-gateinstlist-strip
            • Vl-modinstlist-strip
            • Vl-assignlist-strip
            • Vl-rangelist-strip
            • Vl-expr-strip
            • Vl-atom-strip
              • Vl-gateinst-strip
              • Vl-plainarg-strip
              • Vl-namedarg-strip
              • Vl-modinst-strip
              • Vl-assign-strip
              • Vl-arguments-strip
              • Vl-range-strip
              • Vl-maybe-range-strip
            • 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
    • Stripping-functions

    Vl-atom-strip

    Throw away widths and types from an atom.

    Signature
    (vl-atom-strip x) → x-strip
    Arguments
    x — Guard (vl-expr-p x).
    Returns
    x-strip — Type (and (vl-expr-p x-strip) (eq (vl-expr-kind x-strip) :atom)).

    Definitions and Theorems

    Function: vl-atom-strip$inline

    (defun vl-atom-strip$inline (x)
      (declare (xargs :guard (vl-expr-p x)))
      (declare (xargs :guard (vl-atom-p x)))
      (let ((__function__ 'vl-atom-strip))
        (declare (ignorable __function__))
        (mbe :logic
             (change-vl-atom x
                             :finalwidth nil
                             :finaltype nil
                             :atts nil)
             :exec
             (if (or (vl-atom->finalwidth x)
                     (vl-atom->finaltype x)
                     (vl-atom->atts x))
                 (change-vl-atom x
                                 :finalwidth nil
                                 :finaltype nil
                                 :atts nil)
               x))))

    Theorem: return-type-of-vl-atom-strip

    (defthm return-type-of-vl-atom-strip
      (b* ((x-strip (vl-atom-strip$inline x)))
        (and (vl-expr-p x-strip)
             (eq (vl-expr-kind x-strip) :atom)))
      :rule-classes :rewrite)

    Theorem: vl-atom-strip$inline-of-vl-expr-fix-x

    (defthm vl-atom-strip$inline-of-vl-expr-fix-x
      (equal (vl-atom-strip$inline (vl-expr-fix x))
             (vl-atom-strip$inline x)))

    Theorem: vl-atom-strip$inline-vl-expr-equiv-congruence-on-x

    (defthm vl-atom-strip$inline-vl-expr-equiv-congruence-on-x
      (implies (vl-expr-equiv x x-equiv)
               (equal (vl-atom-strip$inline x)
                      (vl-atom-strip$inline x-equiv)))
      :rule-classes :congruence)