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