Recognizer for vl-lucidocc structures.
(vl-lucidocc-p x) → *
Function:
(defun vl-lucidocc-p (x) (declare (xargs :guard t)) (let ((__function__ 'vl-lucidocc-p)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :solo)) (and (true-listp (cdr x)) (eql (len (cdr x)) 2) (b* ((ctx (std::da-nth 0 (cdr x))) (ss (std::da-nth 1 (cdr x)))) (and (vl-context1-p ctx) (vl-scopestack-p ss))))) ((eq (car x) :slice) (and (true-listp (cdr x)) (eql (len (cdr x)) 4) (b* ((left (std::da-nth 0 (cdr x))) (right (std::da-nth 1 (cdr x))) (ctx (std::da-nth 2 (cdr x))) (ss (std::da-nth 3 (cdr x)))) (and (vl-expr-p left) (vl-expr-p right) (vl-context1-p ctx) (vl-scopestack-p ss))))) (t (and (eq (car x) :tail) (and (true-listp (cdr x)) (eql (len (cdr x)) 2)) (b* ((ctx (std::da-nth 0 (cdr x))) (ss (std::da-nth 1 (cdr x)))) (and (vl-context1-p ctx) (vl-scopestack-p ss)))))))))
Theorem:
(defthm consp-when-vl-lucidocc-p (implies (vl-lucidocc-p x) (consp x)) :rule-classes :compound-recognizer)