• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Bigmems
      • Builtins
      • Execloader
      • Aleo
      • Solidity
        • Values
          • Integer-values
            • Integer-operations
            • Bit-size
            • Uint
              • Uintp
              • Uint-fix
              • Uint-equiv
              • Make-uint
                • Change-uint
                • Uint->value
                • Uint->size
              • Int
            • Boolean-values
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Uint

    Make-uint

    Basic constructor macro for uint structures.

    Syntax
    (make-uint [:size <size>] 
               [:value <value>]) 
    

    This is the usual way to construct uint structures. It simply conses together a structure with the specified fields.

    This macro generates a new uint structure from scratch. See also change-uint, which can "change" an existing structure, instead.

    Definition

    This is an ordinary make- macro introduced by fty::defprod.

    Macro: make-uint

    (defmacro make-uint (&rest args)
      (std::make-aggregate 'uint
                           args '((:size) (:value))
                           'make-uint
                           nil))

    Function: uint

    (defun uint (size value)
      (declare (xargs :guard (and (bit-size-p size) (natp value))))
      (declare (xargs :guard (unsigned-byte-p size value)))
      (let ((__function__ 'uint))
        (declare (ignorable __function__))
        (b* ((size (mbe :logic (bit-size-fix size)
                        :exec size))
             (value (mbe :logic (nfix value) :exec value)))
          (let ((value (mbe :logic (unsigned-byte-fix size value)
                            :exec value)))
            (cons :uint (list size value))))))