Recognizer for vcd-wire structures.
(vcd-wire-p x) → *
Function:
(defun vcd-wire-p (x) (declare (xargs :guard t)) (let ((__function__ 'vcd-wire-p)) (declare (ignorable __function__)) (and (mbe :logic (and (alistp x) (equal (strip-cars x) '(name msb lsb code))) :exec (fty::alist-with-carsp x '(name msb lsb code))) (b* ((name (cdr (std::da-nth 0 x))) (msb (cdr (std::da-nth 1 x))) (lsb (cdr (std::da-nth 2 x))) (code (cdr (std::da-nth 3 x)))) (and (stringp name) (integerp msb) (integerp lsb) (stringp code))))))
Theorem:
(defthm consp-when-vcd-wire-p (implies (vcd-wire-p x) (consp x)) :rule-classes :compound-recognizer)