Recognizer for finalizer structures.
(finalizerp x) → *
Function:
(defun finalizerp (x) (declare (xargs :guard t)) (let ((__function__ 'finalizerp)) (declare (ignorable __function__)) (and (consp x) (eq (car x) :finalizer) (mbe :logic (and (alistp (cdr x)) (equal (strip-cars (cdr x)) '(name inputs comms outputs))) :exec (fty::alist-with-carsp (cdr x) '(name inputs comms outputs))) (b* ((name (cdr (std::da-nth 0 (cdr x)))) (inputs (cdr (std::da-nth 1 (cdr x)))) (comms (cdr (std::da-nth 2 (cdr x)))) (outputs (cdr (std::da-nth 3 (cdr x))))) (and (identifierp name) (finalize-input-listp inputs) (command-listp comms) (finalize-output-listp outputs))))))
Theorem:
(defthm consp-when-finalizerp (implies (finalizerp x) (consp x)) :rule-classes :compound-recognizer)