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