Basic constructor macro for valid-table structures.
(make-valid-table [:filepath <filepath>]
[:scopes <scopes>]
[:externals <externals>]
[:next-uid <next-uid>])
This is the usual way to construct valid-table structures. It simply conses together a structure with the specified fields.
This macro generates a new valid-table structure from scratch. See also change-valid-table, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-valid-table (&rest args) (std::make-aggregate 'valid-table args '((:filepath) (:scopes) (:externals) (:next-uid)) 'make-valid-table nil))
Function:
(defun valid-table (filepath scopes externals next-uid) (declare (xargs :guard (and (filepathp filepath) (valid-scope-listp scopes) (valid-externalsp externals) (uidp next-uid)))) (declare (xargs :guard t)) (b* ((filepath (mbe :logic (filepath-fix filepath) :exec filepath)) (scopes (mbe :logic (valid-scope-list-fix scopes) :exec scopes)) (externals (mbe :logic (valid-externals-fix externals) :exec externals)) (next-uid (mbe :logic (uid-fix next-uid) :exec next-uid))) (list (cons 'filepath filepath) (cons 'scopes scopes) (cons 'externals externals) (cons 'next-uid next-uid))))