• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Community
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • Json
        • Syntheto
        • File-io-light
        • Cryptography
        • Number-theory
        • Lists-light
        • Axe
        • Builtins
        • Solidity
          • Values
            • Integer-values
              • Integer-operations
              • Bit-size
              • Uint
              • Int
                • Intp
                • Int-fix
                • Make-int
                  • Int-equiv
                  • Change-int
                  • Int->value
                  • Int->size
              • Boolean-values
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Int

    Make-int

    Basic constructor macro for int structures.

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

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

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

    Definition

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

    Macro: make-int

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

    Function: int

    (defun int (size value)
      (declare (xargs :guard (and (bit-size-p size)
                                  (integerp value))))
      (declare (xargs :guard (signed-byte-p size value)))
      (let ((__function__ 'int))
        (declare (ignorable __function__))
        (b* ((size (mbe :logic (bit-size-fix size)
                        :exec size))
             (value (mbe :logic (ifix value) :exec value)))
          (let ((value (mbe :logic (signed-byte-fix size value)
                            :exec value)))
            (cons :int (list size value))))))