• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
      • Std/lists
      • Std/alists
      • Obags
      • Std/util
      • Std/strings
      • Std/io
      • Std/osets
      • Std/system
      • Std/basic
      • Std/typed-lists
      • Std/bitsets
      • Std/testing
      • Std/typed-alists
      • Std/stobjs
        • Stobj-updater-independence
        • Def-1d-arr
        • Defstobj-clone
        • Def-2d-arr
        • Defabsstobj-events
        • Bitarr
          • Bits-equiv
          • Set-bit
          • Resize-bits
          • Get-bit
          • Bits-length
        • Natarr
      • Std-extensions
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Testing-utilities
    • Math
  • Std/stobjs

Bitarr

Abstract stobj: logically this just represents a list of |ACL2|::|BITP|s, but it is implemented as an array.

This is a simple abstract stobj array, introduced by def-1d-arr.

Definition: bitarr

(defabsstobj bitarr
             :foundation bitarr$c
             :recognizer (bitarrp :exec bitarr$cp
                                  :logic bitarr$ap)
             :creator (create-bitarr :exec create-bitarr$c
                                     :logic create-bitarr$a)
             :corr-fn bitarr$corr
             :exports ((bits-length :exec bits$c-length
                                    :logic bits$a-length)
                       (get-bit :exec bits$ci :logic bits$ai)
                       (set-bit :exec update-bits$ci
                                :logic update-bits$ai)
                       (resize-bits :exec resize-bits$c
                                    :logic resize-bits$a)))

Subtopics

Bits-equiv
Bit-for-bit list equivalence: bits-equiv recognizes lists whose nth elements are bit-equiv to one another. It is often useful for reasoning about bit arrays like bitarr.
Set-bit
Modify the nth element of the bitarr array.
Resize-bits
Change the length of the bitarr array.
Get-bit
Read the nth element of the bitarr array.
Bits-length
Get the length of the bitarr array.