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