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