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