Basic constructor macro for range structures.
(make-range [:lsb <lsb>] [:width <width>])
This is the usual way to construct range structures. It simply conses together a structure with the specified fields.
This macro generates a new range structure from scratch. See also change-range, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-range (&rest args) (std::make-aggregate 'range args '((:lsb) (:width)) 'make-range nil))
Function:
(defun range (lsb width) (declare (xargs :guard (and (natp lsb) (maybe-posp width)))) (declare (xargs :guard t)) (let ((__function__ 'range)) (declare (ignorable __function__)) (b* ((lsb (mbe :logic (nfix lsb) :exec lsb)) (width (mbe :logic (acl2::maybe-posp-fix width) :exec width))) (std::prod-cons lsb width))))