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