Get the kind (tag) of a statement structure.
(statement-kind x) → kind
Function:
(defun statement-kind$inline (x) (declare (xargs :guard (statementp x))) (let ((__function__ 'statement-kind)) (declare (ignorable __function__)) (mbe :logic (cond ((or (atom x) (eq (car x) :let)) :let) ((eq (car x) :const) :const) ((eq (car x) :assign) :assign) ((eq (car x) :return) :return) ((eq (car x) :for) :for) ((eq (car x) :if) :if) ((eq (car x) :console) :console) ((eq (car x) :block) :block) ((eq (car x) :finalize) :finalize) ((eq (car x) :increment) :increment) (t :decrement)) :exec (car x))))
Theorem:
(defthm statement-kind-possibilities (or (equal (statement-kind x) :let) (equal (statement-kind x) :const) (equal (statement-kind x) :assign) (equal (statement-kind x) :return) (equal (statement-kind x) :for) (equal (statement-kind x) :if) (equal (statement-kind x) :console) (equal (statement-kind x) :block) (equal (statement-kind x) :finalize) (equal (statement-kind x) :increment) (equal (statement-kind x) :decrement)) :rule-classes ((:forward-chaining :trigger-terms ((statement-kind x)))))