Get the kind (tag) of a value structure.
(value-kind x) → kind
Function:
(defun value-kind$inline (x) (declare (xargs :guard (valuep x))) (let ((__function__ 'value-kind)) (declare (ignorable __function__)) (mbe :logic (cond ((or (atom x) (eq (car x) :uchar)) :uchar) ((eq (car x) :schar) :schar) ((eq (car x) :ushort) :ushort) ((eq (car x) :sshort) :sshort) ((eq (car x) :uint) :uint) ((eq (car x) :sint) :sint) ((eq (car x) :ulong) :ulong) ((eq (car x) :slong) :slong) ((eq (car x) :ullong) :ullong) ((eq (car x) :sllong) :sllong) ((eq (car x) :pointer) :pointer) ((eq (car x) :array) :array) (t :struct)) :exec (car x))))
Theorem:
(defthm value-kind-possibilities (or (equal (value-kind x) :uchar) (equal (value-kind x) :schar) (equal (value-kind x) :ushort) (equal (value-kind x) :sshort) (equal (value-kind x) :uint) (equal (value-kind x) :sint) (equal (value-kind x) :ulong) (equal (value-kind x) :slong) (equal (value-kind x) :ullong) (equal (value-kind x) :sllong) (equal (value-kind x) :pointer) (equal (value-kind x) :array) (equal (value-kind x) :struct)) :rule-classes ((:forward-chaining :trigger-terms ((value-kind x)))))