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