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