Recognizer for svl-occ structures.
(svl-occ-p x) → *
Function:
(defun svl-occ-p (x) (declare (xargs :guard t)) (let ((acl2::__function__ 'svl-occ-p)) (declare (ignorable acl2::__function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :assign)) (and (true-listp (cdr x)) (eql (len (cdr x)) 2) (b* ((output (std::da-nth 0 (cdr x))) (svex (std::da-nth 1 (cdr x)))) (and (sv::svar-p output) (svex-p svex))))) (t (and (eq (car x) :module) (and (true-listp (cdr x)) (eql (len (cdr x)) 3)) (b* ((inputs (std::da-nth 0 (cdr x))) (outputs (std::da-nth 1 (cdr x))) (name (std::da-nth 2 (cdr x)))) (and (svexlist-p inputs) (wire-list-listp outputs) (sv::modname-p name)))))))))
Theorem:
(defthm consp-when-svl-occ-p (implies (svl-occ-p x) (consp x)) :rule-classes :compound-recognizer)