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