• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
          • Stmt-tools
          • Modnamespace
          • Vl-parse-expr-from-str
          • Welltyped
          • Reordering-by-name
          • Flat-warnings
          • Genblob
          • Expr-building
          • Datatype-tools
            • Vl-usertype-resolve
            • Vl-datatype-range
            • Vl-datatype-exprtype
            • Vl-datatype-range-conservative
            • Vl-find-structmember
            • Vl-datatype-usertype-elim
            • Vl-packeddimensionlist-total-size
            • Vl-datatype-bitselect-ok
            • Vl-datatype->structmembers
            • Vl-datatype-set-unsigned
              • Vl-packed-datatype-size
              • Vl-datatype-size
            • 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
    • Datatype-tools

    Vl-datatype-set-unsigned

    Signature
    (vl-datatype-set-unsigned x) → new-x
    Arguments
    x — Guard (vl-datatype-p x).
    Returns
    new-x — Type (vl-datatype-p new-x).

    Definitions and Theorems

    Function: vl-datatype-set-unsigned

    (defun vl-datatype-set-unsigned (x)
     (declare (xargs :guard (vl-datatype-p x)))
     (let ((__function__ 'vl-datatype-set-unsigned))
      (declare (ignorable __function__))
      (vl-datatype-case
         x
         :vl-coretype
         (mbe :logic
              (change-vl-coretype x :signedp nil)
              :exec
              (if x.signedp (change-vl-coretype x :signedp nil)
                x))
         :vl-struct (mbe :logic (change-vl-struct x :signedp nil)
                         :exec
                         (if x.signedp (change-vl-struct x :signedp nil)
                           x))
         :vl-union (mbe :logic (change-vl-union x :signedp nil)
                        :exec
                        (if x.signedp (change-vl-union x :signedp nil)
                          x))
         :otherwise (vl-datatype-fix x))))

    Theorem: vl-datatype-p-of-vl-datatype-set-unsigned

    (defthm vl-datatype-p-of-vl-datatype-set-unsigned
      (b* ((new-x (vl-datatype-set-unsigned x)))
        (vl-datatype-p new-x))
      :rule-classes :rewrite)

    Theorem: vl-datatype-set-unsigned-of-vl-datatype-fix-x

    (defthm vl-datatype-set-unsigned-of-vl-datatype-fix-x
      (equal (vl-datatype-set-unsigned (vl-datatype-fix x))
             (vl-datatype-set-unsigned x)))

    Theorem: vl-datatype-set-unsigned-vl-datatype-equiv-congruence-on-x

    (defthm vl-datatype-set-unsigned-vl-datatype-equiv-congruence-on-x
      (implies (vl-datatype-equiv x x-equiv)
               (equal (vl-datatype-set-unsigned x)
                      (vl-datatype-set-unsigned x-equiv)))
      :rule-classes :congruence)