• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
      • B*
      • Defunc
      • Fty
        • Deftagsum
        • Defprod
        • Defflexsum
        • Defbitstruct
        • Deflist
        • Defalist
        • Defbyte
        • Deffixequiv
        • Defresult
        • Deffixtype
        • Defoption
        • Fty-discipline
        • Fold
        • Fty-extensions
          • Defbyte
          • Defresult
          • Fold
          • Defsubtype
          • Defset
          • Specific-types
          • Defflatsum
          • Deflist-of-len
          • Pos-list
          • Defbytelist
          • Defomap
          • Defbyte-standard-instances
            • Ubyte5
            • Ubyte8
            • Ubyte32
            • Ubyte12
            • Ubyte64
            • Ubyte16
            • Ubyte128
            • Sbyte8
            • Sbyte64
            • Sbyte32
            • Sbyte16
            • Sbyte128
            • Ubyte20
            • Ubyte11
            • Ubyte4
            • Ubyte256
            • Sbyte256
            • Ubyte7
            • Ubyte6
            • Ubyte3
            • Ubyte2
            • Ubyte1
            • Sbyte4
            • Sbyte3
            • Sbyte2
            • Sbyte1
            • Defbyte-standard-instances-ihs-theorems
            • Defubyte
              • Defsbyte
            • Deffixtype-alias
            • Defbytelist-standard-instances
            • Defunit
            • Byte-list
            • Byte
            • Database
            • Pos-option
            • Nibble
            • Nat-option
            • String-option
            • Byte-list20
            • Byte-list32
            • Byte-list64
            • Pseudo-event-form
            • Natoption/natoptionlist
            • Nati
            • Character-list
            • Nat/natlist
            • Maybe-string
            • Nibble-list
            • Natoption/natoptionlist-result
            • Nat/natlist-result
            • Nat-option-list-result
            • Set
            • String-result
            • String-list-result
            • Nat-result
            • Nat-option-result
            • Nat-list-result
            • Maybe-string-result
            • Integer-result
            • Character-result
            • Character-list-result
            • Boolean-result
            • Map
            • Bag
            • Pos-set
            • Hex-digit-char-list
            • Dec-digit-char-list
            • Pseudo-event-form-list
            • Nat-option-list
            • Symbol-set
            • String-set
            • Nat-set
            • Oct-digit-char-list
            • Bin-digit-char-list
            • Bit-list
          • Defsubtype
          • Defset
          • Deftypes
          • Specific-types
          • Defflatsum
          • Deflist-of-len
          • Defbytelist
          • Fty::basetypes
          • Defomap
          • Defvisitors
          • Deffixtype-alias
          • Deffixequiv-sk
          • Defunit
          • Multicase
          • Deffixequiv-mutual
          • Fty::baselists
          • Def-enumcase
          • Defmap
        • Apt
        • Std/util
        • Defdata
        • Defrstobj
        • Seq
        • Match-tree
        • Defrstobj
        • With-supporters
        • Def-partial-measure
        • Template-subst
        • Soft
        • Defthm-domain
        • Event-macros
        • Def-universal-equiv
        • Def-saved-obligs
        • With-supporters-after
        • Definec
        • Sig
        • Outer-local
        • Data-structures
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Defbyte-standard-instances

    Defubyte

    Specialized form of defbyte for generating standard fixtypes of unsigned bytes of explicit integer sizes.

    This macro just takes a positive integer as input.

    This macro generates fixtypes called acl2::ubyte<size>, where <size> consists of the decimal digits of the size. The recognizer, fixer, and equivalence are called acl2::ubyte<size>p, acl2::ubyte<size>-fix, and acl2::ubyte<size>-equiv.

    This macro also generates some standardized XDOC parents and short, and no XDOC long.

    Macro: defubyte

    (defmacro defubyte (size)
     (declare (xargs :guard (posp size)))
     (cons
      'defbyte
      (cons
       (acl2::packn (list 'acl2::ubyte size))
       (cons
        ':size
        (cons
         size
         (cons
          ':signed
          (cons
           'nil
           (cons
            ':pred
            (cons
             (acl2::packn (list 'acl2::ubyte size 'p))
             (cons
              ':fix
              (cons
               (acl2::packn (list 'acl2::ubyte size '-fix))
               (cons
                ':equiv
                (cons
                 (acl2::packn (list 'acl2::ubyte size '-equiv))
                 (cons
                  ':parents
                  (cons
                   '(defbyte-standard-instances)
                   (cons
                    ':short
                    (cons
                     (concatenate
                       'string
                       "Fixtype of unsigned bytes of size "
                       (coerce (explode-nonnegative-integer size 10 nil)
                               'string)
                       ".")
                     'nil)))))))))))))))))