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