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