• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
      • 100-theorems
      • Arithmetic
      • Bit-vectors
        • Sparseint
        • Bitops
        • Bv
        • Ihs
          • Logops-definitions
            • Logops-byte-functions
            • Defword
            • Defbytetype
            • Logext
            • Logrev
            • Loghead
            • Logops-bit-functions
            • Logtail
            • Logapp
            • Logsat
            • Binary--
            • Logcdr
            • Logcar
            • Logbit
            • Logextu
            • Logcons
            • Lshu
            • Logrpl
              • Ihs/logrpl-lemmas
            • Ashu
            • Logmaskp
            • Lognotu
            • Logmask
            • Imod
            • Ifloor
            • Bfix
            • Bitmaskp
            • Logite
            • Expt2
            • Zbp
            • *logops-functions*
            • Word/bit-macros
            • Logops-definitions-theory
            • Logops-functions
            • Lbfix
            • Logextu-guard
            • Lshu-guard
            • Logtail-guard
            • Logrpl-guard
            • Logrev-guard
            • Lognotu-guard
            • Logmask-guard
            • Loghead-guard
            • Logext-guard
            • Logbit-guard
            • Logapp-guard
            • Ashu-guard
          • Math-lemmas
          • Ihs-theories
          • Ihs-init
          • Logops
        • Rtl
      • Algebra
    • Testing-utilities
  • Logops-definitions

Logrpl

Logical replace. (logrpl size i j) replaces the size low-order bits of j with the size low-order bits of i.

Signature
(logrpl size i j) → int
Arguments
size — Guard (and (integerp size) (<= 0 size)).
i — Guard (integerp i).
j — Guard (integerp j).
Returns
int — Type (integerp int).

logrpl is a specification for the result of storing short values into long words, i.e., the short value simply replaces the head of the long word.

This function is equivalent to (WRB i (BSP size 0) j).

Definitions and Theorems

Function: logrpl

(defun logrpl (size i j)
  (declare (xargs :guard (and (and (integerp size) (<= 0 size))
                              (integerp i)
                              (integerp j))))
  (let ((__function__ 'logrpl))
    (declare (ignorable __function__))
    (logapp size i (logtail size j))))

Theorem: logrpl-type

(defthm logrpl-type
  (b* ((int (logrpl size i j)))
    (integerp int))
  :rule-classes :type-prescription)

Subtopics

Ihs/logrpl-lemmas
Lemmas about logrpl from the logops-lemmas book.