Recognizer for pointer structures.
(pointerp x) → *
Function:
(defun pointerp (x) (declare (xargs :guard t)) (let ((__function__ 'pointerp)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :null)) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) ((eq (car x) :dangling) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) (t (and (eq (car x) :valid) (and (true-listp (cdr x)) (eql (len (cdr x)) 1)) (b* ((get (std::da-nth 0 (cdr x)))) (objdesignp get))))))))
Theorem:
(defthm consp-when-pointerp (implies (pointerp x) (consp x)) :rule-classes :compound-recognizer)