Get the kind (tag) of a stmt structure.
(stmt-kind x) → kind
Function:
(defun stmt-kind$inline (x) (declare (xargs :guard (stmtp x))) (let ((__function__ 'stmt-kind)) (declare (ignorable __function__)) (mbe :logic (cond ((eq (car x) :labeled) :labeled) ((eq (car x) :compound) :compound) ((eq (car x) :expr) :expr) ((eq (car x) :if) :if) ((eq (car x) :ifelse) :ifelse) ((eq (car x) :switch) :switch) ((eq (car x) :while) :while) ((eq (car x) :dowhile) :dowhile) ((eq (car x) :for-expr) :for-expr) ((eq (car x) :for-decl) :for-decl) ((eq (car x) :for-ambig) :for-ambig) ((or (atom x) (eq (car x) :goto)) :goto) ((eq (car x) :continue) :continue) ((eq (car x) :break) :break) ((eq (car x) :return) :return) (t :asm)) :exec (car x))))
Theorem:
(defthm stmt-kind-possibilities (or (equal (stmt-kind x) :labeled) (equal (stmt-kind x) :compound) (equal (stmt-kind x) :expr) (equal (stmt-kind x) :if) (equal (stmt-kind x) :ifelse) (equal (stmt-kind x) :switch) (equal (stmt-kind x) :while) (equal (stmt-kind x) :dowhile) (equal (stmt-kind x) :for-expr) (equal (stmt-kind x) :for-decl) (equal (stmt-kind x) :for-ambig) (equal (stmt-kind x) :goto) (equal (stmt-kind x) :continue) (equal (stmt-kind x) :break) (equal (stmt-kind x) :return) (equal (stmt-kind x) :asm)) :rule-classes ((:forward-chaining :trigger-terms ((stmt-kind x)))))