Basic constructor macro for decl structures.
(make-decl [:name <name>] [:type <type>])
This is the usual way to construct decl structures. It simply conses together a structure with the specified fields.
This macro generates a new decl structure from scratch. See also change-decl, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-decl (&rest args) (std::make-aggregate 'decl args '((:name) (:type make-hint-pair)) 'make-decl nil))
Function:
(defun decl (name type) (declare (xargs :guard (and (symbolp name) (hint-pair-p type)))) (declare (xargs :guard (symbolp (hint-pair->thm type)))) (let ((acl2::__function__ 'decl)) (declare (ignorable acl2::__function__)) (b* ((name (mbe :logic (symbol-fix name) :exec name)) (type (mbe :logic (hint-pair-fix type) :exec type))) (let ((type (mbe :logic (decl->type-reqfix type) :exec type))) (list (cons 'name name) (cons 'type type))))))