Recognizer for exec-outcome structures.
(exec-outcome-p x) → *
Function:
(defun exec-outcome-p (x) (declare (xargs :guard t)) (let ((__function__ 'exec-outcome-p)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :terminating)) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((result (std::da-nth 0 (cdr x)))) (valuep result)))) ((eq (car x) :error) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) (t (and (eq (car x) :nonterminating) (and (true-listp (cdr x)) (eql (len (cdr x)) 0)) (b* nil t)))))))
Theorem:
(defthm consp-when-exec-outcome-p (implies (exec-outcome-p x) (consp x)) :rule-classes :compound-recognizer)