Recognizer for screen-message structures.
(screen-messagep x) → *
Function:
(defun screen-messagep (x) (declare (xargs :guard t)) (let ((__function__ 'screen-messagep)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :error)) (and (true-listp (cdr x)) (eql (len (cdr x)) 2) (b* ((string (std::da-nth 0 (cdr x))) (values (std::da-nth 1 (cdr x)))) (and (char-listp string) (value-listp values))))) (t (and (eq (car x) :log) (and (true-listp (cdr x)) (eql (len (cdr x)) 2)) (b* ((string (std::da-nth 0 (cdr x))) (values (std::da-nth 1 (cdr x)))) (and (char-listp string) (value-listp values)))))))))
Theorem:
(defthm consp-when-screen-messagep (implies (screen-messagep x) (consp x)) :rule-classes :compound-recognizer)