Recognizer for fsm structures.
(fsm-p x) → *
Function:
(defun fsm-p (x) (declare (xargs :guard t)) (let ((__function__ 'fsm-p)) (declare (ignorable __function__)) (and (mbe :logic (and (alistp x) (equal (strip-cars x) '(values nextstate))) :exec (fty::alist-with-carsp x '(values nextstate))) (b* ((values (cdr (std::da-nth 0 x))) (nextstate (cdr (std::da-nth 1 x)))) (and (svex-alist-p values) (svex-alist-p nextstate))))))
Theorem:
(defthm consp-when-fsm-p (implies (fsm-p x) (consp x)) :rule-classes :compound-recognizer)