Process the inputs and generate the events.
(defstruct-fn args call ctx state) → (mv erp event state)
Function:
(defun defstruct-fn (args call ctx state) (declare (xargs :stobjs (state))) (declare (xargs :guard (and (true-listp args) (pseudo-event-formp call) (ctxp ctx)))) (let ((__function__ 'defstruct-fn)) (declare (ignorable __function__)) (b* (((er (list tag tag-ident members flexiblep redundant) :iferr '(_)) (defstruct-process-inputs args call ctx state)) ((when redundant) (acl2::value '(value-triple :redundant))) (event (defstruct-gen-everything tag tag-ident members flexiblep call))) (acl2::value event))))
Theorem:
(defthm pseudo-event-formp-of-defstruct-fn.event (b* (((mv acl2::?erp acl2::?event acl2::?state) (defstruct-fn args call ctx state))) (pseudo-event-formp event)) :rule-classes :rewrite)