• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
      • 100-theorems
      • Arithmetic
      • Bit-vectors
        • Sparseint
          • Sparseint-impl
            • Sparseint$-binary-bitop-width
            • Sparseint$-plus-width
            • Sparseint$-binary-bitop-offset
            • Sparseint$-binary-bitop-int-width
            • Sparseint$-plus-int-width
            • Sum-with-cin
            • Sparseint$-plus-offset
            • Sparseint$-binary-bitop-int
            • Sparseint$-finalize-concat
            • Sparseint$-plus-int
            • Sparseint$-binary-bittest-width
            • Sparseint$-binary-bittest-int-width
            • Sparseint$-trailing-0-count-width
            • Sparseint$-height
            • Int-to-sparseint$-rec
            • Carry-out
            • Sparseint$-compare-width
            • Sparseint$-binary-bittest-offset
            • Sparseint$-equal-width
            • Sparseint$-binary-bittest-int
            • Sparseint$-compare-int-width
            • Sparseint$-bitcount-width
            • Sparseint$-unary-bittest-width
            • Sparseint$-rightshift-rec
            • Sparseint$-equal-int-width
            • Sparseint$-trailing-0-count-rec
            • Sparseint$-unary-bitop
            • Sparseint$-concatenate
            • Sparseint$-length-width-rec
            • Sparseint$-sign-ext
            • Sparseint$-binary-bitop
            • Binary-bitop
            • Sparseint$-compare-offset
            • Sparseint$-unary-bittest-offset
            • Sparseint$-equal-offset
            • Sparseint$-truncate
            • Sparseint$-mergeable-leaves-p
            • Carry-out-bit
            • Sparseint$-truncate-height
            • Sparseint$-compare-int
            • Sparseint$-binary-bittest
            • Sparseint$-equal-int
            • Sparseint$-rightshift
            • Sparseint$-leaves-mergeable-p
            • Sparseint$-plus
            • Unary-bitop
            • Sparseint$-bitcount-rec
            • Within-1
            • Sparseint$
              • Sparseint$-p
              • Sparseint$-fix
              • Sparseint$-concat
                • Make-sparseint$-concat
                  • Sparseint$-concat->msbs-taller
                  • Sparseint$-concat->lsbs-taller
                  • Sparseint$-concat->width
                  • Sparseint$-concat->msbs
                  • Sparseint$-concat->lsbs
                  • Change-sparseint$-concat
                • Sparseint$-equiv
                • Sparseint$-count
                • Sparseint$-leaf
                • Sparseint$-kind
              • Binary-bitop-cofactor2
              • Binary-bitop-cofactor1
              • Sparseint$-compare
              • Sparseint$-unary-bittest
              • Sparseint$-height-correct-exec
              • Sparseint$-equal
              • Sparseint$-bitnot
              • Sparseint$-unary-minus
              • Sparseint$-bit
              • Int-to-sparseint$
              • Binary-bittest
              • Sparseint$-length-rec
              • Sparseint$-val
              • Binary-bitop-swap
              • Compare
              • Sparseint$-real-height
              • Sparseint$-height-correctp
              • Sparseint$-length
            • Sparseint-p
            • Sparseint-binary-bittest
            • Sparseint-concatenate
            • Sparseint-binary-bitop
            • Sparseint-bitite
            • Sparseint-fix
            • Sparseint$-binary-minus
            • Sparseint-trailing-1-count-from
            • Sparseint-trailing-0-count-from
            • Sparseint-equal
            • Sparseint-test-bitorc2
            • Sparseint-test-bitorc1
            • Sparseint-test-bitnand
            • Sparseint-test-bitandc2
            • Sparseint-test-bitandc1
            • Sparseint-test-bitand
            • Sparseint-rightshift
            • Sparseint-bitcount-from
            • Sparseint-test-bitxor
            • Sparseint-test-bitor
            • Sparseint-test-bitnor
            • Sparseint-test-biteqv
            • Sparseint-compare
            • Sparseint-binary-minus
            • Sparseint-sign-ext
            • Sparseint-plus
            • Sparseint-bitandc2
            • Sparseint-bitandc1
            • Sparseint-bitand
            • Sparseint$-leaf-bitlimit
            • Sparseint-bitxor
            • Sparseint-bitorc2
            • Sparseint-bitorc1
            • Sparseint-bitor
            • Sparseint-bitnor
            • Sparseint-bitnand
            • Sparseint-biteqv
            • Sparseint-ash
            • Sparseint-<
            • Sparseint-bit
            • Sparseint-trailing-1-count
            • Sparseint-trailing-0-count
            • Sparseint-unary-minus
            • Sparseint-length
            • Sparseint-bitnot
            • Sparseint-bitcount
            • Int-to-sparseint
            • Sparseint-val
          • Bitops
          • Bv
          • Ihs
          • Rtl
        • Algebra
      • Testing-utilities
    • Sparseint$-concat

    Make-sparseint$-concat

    Basic constructor macro for sparseint$-concat structures.

    Syntax
    (make-sparseint$-concat [:width <width>] 
                            [:lsbs-taller <lsbs-taller>] 
                            [:msbs-taller <msbs-taller>] 
                            [:lsbs <lsbs>] 
                            [:msbs <msbs>]) 
    

    This is the usual way to construct sparseint$-concat structures. It simply conses together a structure with the specified fields.

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

    Definition

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

    Macro: make-sparseint$-concat

    (defmacro make-sparseint$-concat (&rest args)
      (std::make-aggregate 'sparseint$-concat
                           args
                           '((:width)
                             (:lsbs-taller)
                             (:msbs-taller)
                             (:lsbs)
                             (:msbs))
                           'make-sparseint$-concat
                           nil))

    Function: sparseint$-concat

    (defun sparseint$-concat (width lsbs-taller msbs-taller lsbs msbs)
      (declare (xargs :guard (and (posp width)
                                  (booleanp lsbs-taller)
                                  (booleanp msbs-taller)
                                  (sparseint$-p lsbs)
                                  (sparseint$-p msbs))))
      (declare (xargs :guard t))
      (let ((__function__ 'sparseint$-concat))
        (declare (ignorable __function__))
        (b* ((width (mbe :logic (pos-fix width)
                         :exec width))
             (lsbs-taller (mbe :logic (acl2::bool-fix lsbs-taller)
                               :exec lsbs-taller))
             (msbs-taller (mbe :logic (acl2::bool-fix msbs-taller)
                               :exec msbs-taller))
             (lsbs (mbe :logic (sparseint$-fix lsbs)
                        :exec lsbs))
             (msbs (mbe :logic (sparseint$-fix msbs)
                        :exec msbs)))
          (cons (logcons (bool->bit lsbs-taller)
                         (logcons (bool->bit msbs-taller) width))
                (cons lsbs msbs)))))