• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
        • Defun
        • Declare
        • System-utilities
        • Stobj
          • Defstobj
          • Defabsstobj
          • Stobj-table
          • Preservation-thms
          • Nested-stobjs
          • Defrstobj
          • With-global-stobj
          • User-stobjs-modified-warnings
          • Stobj-example-1
          • Defrstobj
          • Stobj-example-3
          • Stobj-example-1-proofs
          • With-local-stobj
          • Stobj-example-1-defuns
          • Declare-stobjs
          • Trans-eval-and-stobjs
          • With-local-state
          • Stobj-example-2
          • Stobj-example-1-implementation
          • Add-global-stobj
          • Swap-stobjs
          • Resize-list
          • Nth-aliases-table
          • Def-stobj-frame
          • Trans-eval-and-locally-bound-stobjs
          • 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
          • Count-keys
          • Update-nth-array
          • Remove-global-stobj
        • State
        • Mutual-recursion
        • Memoize
        • Mbe
        • Io
        • Defpkg
        • Apply$
        • Loop$
        • Programming-with-state
        • Arrays
        • Characters
        • Time$
        • Defmacro
        • Loop$-primer
        • Fast-alists
        • Defconst
        • Evaluation
        • Guard
        • Equality-variants
        • Compilation
        • Hons
        • ACL2-built-ins
        • Developers-guide
        • System-attachments
        • Advanced-features
        • Set-check-invariant-risk
        • Numbers
        • Efficiency
        • Irrelevant-formals
        • Introduction-to-programming-in-ACL2-for-those-who-know-lisp
        • Redefining-programs
        • Lists
        • Invariant-risk
        • Errors
        • Defabbrev
        • Conses
        • Alists
        • Set-register-invariant-risk
        • Strings
        • Program-wrapper
        • Get-internal-time
        • Basics
        • Packages
        • Oracle-eval
        • Defmacro-untouchable
        • <<
        • Primitive
        • Revert-world
        • Unmemoize
        • Set-duplicate-keys-action
        • Symbols
        • Def-list-constructor
        • Easy-simplify-term
        • Defiteration
        • Fake-oracle-eval
        • Defopen
        • Sleep
      • Operational-semantics
      • Real
      • Start-here
      • Debugging
      • Miscellaneous
      • Output-controls
      • Macros
      • Interfacing-tools
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • 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.