Get the kind (tag) of a pointer structure.
(pointer-kind x) → kind
Function:
(defun pointer-kind$inline (x) (declare (xargs :guard (pointerp x))) (let ((__function__ 'pointer-kind)) (declare (ignorable __function__)) (mbe :logic (cond ((or (atom x) (eq (car x) :null)) :null) ((eq (car x) :dangling) :dangling) (t :valid)) :exec (car x))))
Theorem:
(defthm pointer-kind-possibilities (or (equal (pointer-kind x) :null) (equal (pointer-kind x) :dangling) (equal (pointer-kind x) :valid)) :rule-classes ((:forward-chaining :trigger-terms ((pointer-kind x)))))