• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • C
          • Syntax-for-tools
          • Atc
          • Transformation-tools
          • Language
            • Abstract-syntax
            • Integer-ranges
            • Implementation-environments
              • Integer-format-templates
              • Ienv
              • Integer-formats
              • Ienv-ushort-rangep
              • Ienv-ulong-rangep
              • Ienv-ullong-rangep
              • Ienv-uint-rangep
              • Ienv-uchar-rangep
              • Ienv-sshort-rangep
              • Ienv-slong-rangep
              • Ienv-sllong-rangep
              • Ienv-sint-rangep
              • Ienv-schar-rangep
              • Ienv-char-rangep
              • Ienv->schar-min
              • Ienv->schar-max
              • Ienv->char-size
              • Ienv->char-min
              • Ienv->char-max
              • Ienv->uchar-max
              • Ienv->short-bit-size
              • Ienv->long-bit-size
              • Ienv->llong-bit-size
              • Ienv->int-bit-size
              • Ienv->short-byte-size
              • Ienv->long-byte-size
              • Ienv->llong-byte-size
              • Ienv->int-byte-size
              • Versions
              • Ienv->ushort-max
              • Ienv->ullong-max
              • Ienv->sshort-min
              • Ienv->sllong-min
              • Ienv->sllong-max
              • Ienv->bool-byte-size
              • Ienv->bool-bit-size
              • Ienv->ulong-max
              • Ienv->uint-max
              • Ienv->sshort-max
              • Ienv->slong-min
              • Ienv->slong-max
              • Ienv->sint-min
              • Ienv->sint-max
              • Schar-formats
              • Char-formats
              • Uchar-formats
              • Signed-formats
              • Bool-formats
                • Bool-format
                  • Bool-format-fix
                  • Bool-format-equiv
                  • Make-bool-format
                    • Change-bool-format
                    • Bool-format->value-index
                    • Bool-format->byte-size
                    • Bool-format->trap
                    • Bool-formatp
                  • Bool-format-wfp
                  • Bool-format-lsb
              • Dynamic-semantics
              • Static-semantics
              • Grammar
              • Types
              • Integer-formats-definitions
              • Computation-states
              • Portable-ascii-identifiers
              • Values
              • Integer-operations
              • Object-designators
              • Operations
              • Errors
              • Tag-environments
              • Function-environments
              • Character-sets
              • Flexible-array-member-removal
              • Arithmetic-operations
              • Pointer-operations
              • Real-operations
              • Array-operations
              • Scalar-operations
              • Structure-operations
            • Representation
            • Insertion-sort
            • Pack
          • Soft
          • Bv
          • Imp-language
          • Ethereum
          • Event-macros
          • Java
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Bool-format

    Make-bool-format

    Basic constructor macro for bool-format structures.

    Syntax
    (make-bool-format [:byte-size <byte-size>] 
                      [:value-index <value-index>] 
                      [:trap <trap>]) 
    

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

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

    Definition

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

    Macro: make-bool-format

    (defmacro make-bool-format (&rest args)
      (std::make-aggregate 'bool-format
                           args
                           '((:byte-size) (:value-index) (:trap))
                           'make-bool-format
                           nil))

    Function: bool-format

    (defun bool-format (byte-size value-index trap)
      (declare (xargs :guard (and (posp byte-size)
                                  (natp value-index)
                                  (acl2::any-p trap))))
      (declare (xargs :guard t))
      (b* ((byte-size (mbe :logic (pos-fix byte-size)
                           :exec byte-size))
           (value-index (mbe :logic (nfix value-index)
                             :exec value-index))
           (trap (mbe :logic (identity trap)
                      :exec trap)))
        (list (cons 'byte-size byte-size)
              (cons 'value-index value-index)
              (cons 'trap trap))))