Recognizer for validator-state structures.
(validator-statep x) → *
Function:
(defun validator-statep (x) (declare (xargs :guard t)) (let ((__function__ 'validator-statep)) (declare (ignorable __function__)) (and (mbe :logic (and (alistp x) (equal (strip-cars x) '(round dag buffer endorsed last blockchain committed timer))) :exec (fty::alist-with-carsp x '(round dag buffer endorsed last blockchain committed timer))) (b* ((round (cdr (std::da-nth 0 x))) (dag (cdr (std::da-nth 1 x))) (buffer (cdr (std::da-nth 2 x))) (endorsed (cdr (std::da-nth 3 x))) (last (cdr (std::da-nth 4 x))) (blockchain (cdr (std::da-nth 5 x))) (committed (cdr (std::da-nth 6 x))) (timer (cdr (std::da-nth 7 x)))) (and (posp round) (certificate-setp dag) (certificate-setp buffer) (address+pos-setp endorsed) (natp last) (block-listp blockchain) (certificate-setp committed) (timerp timer))))))
Theorem:
(defthm consp-when-validator-statep (implies (validator-statep x) (consp x)) :rule-classes :compound-recognizer)