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