Get the kind (tag) of a jstatem structure.
(jstatem-kind x) → kind
Function:
(defun jstatem-kind$inline (x) (declare (xargs :guard (jstatemp x))) (let ((__function__ 'jstatem-kind)) (declare (ignorable __function__)) (mbe :logic (cond ((or (atom x) (eq (car x) :locvar)) :locvar) ((eq (car x) :expr) :expr) ((eq (car x) :return) :return) ((eq (car x) :throw) :throw) ((eq (car x) :break) :break) ((eq (car x) :continue) :continue) ((eq (car x) :if) :if) ((eq (car x) :ifelse) :ifelse) ((eq (car x) :while) :while) ((eq (car x) :do) :do) (t :for)) :exec (car x))))
Theorem:
(defthm jstatem-kind-possibilities (or (equal (jstatem-kind x) :locvar) (equal (jstatem-kind x) :expr) (equal (jstatem-kind x) :return) (equal (jstatem-kind x) :throw) (equal (jstatem-kind x) :break) (equal (jstatem-kind x) :continue) (equal (jstatem-kind x) :if) (equal (jstatem-kind x) :ifelse) (equal (jstatem-kind x) :while) (equal (jstatem-kind x) :do) (equal (jstatem-kind x) :for)) :rule-classes ((:forward-chaining :trigger-terms ((jstatem-kind x)))))