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