Recognizer for module structures.
(module-p x) → *
Function:
(defun module-p (x) (declare (xargs :guard t)) (let ((__function__ 'module-p)) (declare (ignorable __function__)) (and (mbe :logic (and (alistp x) (equal (strip-cars x) '(wires insts assigns fixups constraints aliaspairs))) :exec (fty::alist-with-carsp x '(wires insts assigns fixups constraints aliaspairs))) (b* ((wires (cdr (std::da-nth 0 x))) (insts (cdr (std::da-nth 1 x))) (assigns (cdr (std::da-nth 2 x))) (fixups (cdr (std::da-nth 3 x))) (constraints (cdr (std::da-nth 4 x))) (aliaspairs (cdr (std::da-nth 5 x)))) (and (wirelist-p wires) (modinstlist-p insts) (assigns-p assigns) (assigns-p fixups) (constraintlist-p constraints) (lhspairs-p aliaspairs))))))
Theorem:
(defthm consp-when-module-p (implies (module-p x) (consp x)) :rule-classes :compound-recognizer)