Basic constructor macro for vl-struct structures.
(make-vl-struct [:members <members>] [:packedp <packedp>] [:pdims <pdims>] [:udims <udims>] [:signedp <signedp>])
This is the usual way to construct vl-struct structures. It simply conses together a structure with the specified fields.
This macro generates a new vl-struct structure from scratch. See also change-vl-struct, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-vl-struct (&rest args) (std::make-aggregate 'vl-struct args '((:members) (:packedp) (:pdims) (:udims) (:signedp)) 'make-vl-struct nil))
Function:
(defun vl-struct (members packedp pdims udims signedp) (declare (xargs :guard (and (vl-structmemberlist-p members) (booleanp packedp) (vl-dimensionlist-p pdims) (vl-dimensionlist-p udims) (booleanp signedp)))) (declare (xargs :guard t)) (let ((__function__ 'vl-struct)) (declare (ignorable __function__)) (b* ((members (mbe :logic (vl-structmemberlist-fix members) :exec members)) (packedp (mbe :logic (acl2::bool-fix packedp) :exec packedp)) (pdims (mbe :logic (vl-dimensionlist-fix pdims) :exec pdims)) (udims (mbe :logic (vl-dimensionlist-fix udims) :exec udims)) (signedp (mbe :logic (acl2::bool-fix signedp) :exec signedp))) (cons :vl-struct (std::prod-cons (std::prod-cons members packedp) (std::prod-cons pdims (std::prod-cons udims signedp)))))))