Recognizer for parstate structures.
(parstatep x) → *
Function:
(defun parstatep (x) (declare (xargs :guard t)) (let ((__function__ 'parstatep)) (declare (ignorable __function__)) (and (mbe :logic (and (alistp x) (equal (strip-cars x) '(bytes position chars-read chars-unread tokens-read tokens-read-len tokens-unread checkpoints gcc size))) :exec (fty::alist-with-carsp x '(bytes position chars-read chars-unread tokens-read tokens-read-len tokens-unread checkpoints gcc size))) (b* ((bytes (cdr (std::da-nth 0 x))) (position (cdr (std::da-nth 1 x))) (chars-read (cdr (std::da-nth 2 x))) (chars-unread (cdr (std::da-nth 3 x))) (tokens-read (cdr (std::da-nth 4 x))) (tokens-read-len (cdr (std::da-nth 5 x))) (tokens-unread (cdr (std::da-nth 6 x))) (checkpoints (cdr (std::da-nth 7 x))) (gcc (cdr (std::da-nth 8 x))) (size (cdr (std::da-nth 9 x)))) (and (byte-listp bytes) (positionp position) (char+position-listp chars-read) (char+position-listp chars-unread) (token+span-listp tokens-read) (natp tokens-read-len) (token+span-listp tokens-unread) (nat-listp checkpoints) (booleanp gcc) (natp size) (equal size (+ (len bytes) (len chars-unread) (len tokens-unread))) (equal tokens-read-len (len tokens-read)))))))
Theorem:
(defthm consp-when-parstatep (implies (parstatep x) (consp x)) :rule-classes :compound-recognizer)