Recognizer for data-item structures.
(data-item-p x) → *
Function:
(defun data-item-p (x) (declare (xargs :guard t)) (let ((__function__ 'data-item-p)) (declare (ignorable __function__)) (and (consp x) (eq (car x) :data) (mbe :logic (and (alistp (cdr x)) (equal (strip-cars (cdr x)) '(name value))) :exec (fty::alist-with-carsp (cdr x) '(name value))) (b* ((name (cdr (std::da-nth 0 (cdr x)))) (value (cdr (std::da-nth 1 (cdr x))))) (and (plain-stringp name) (data-value-p value))))))
Theorem:
(defthm consp-when-data-item-p (implies (data-item-p x) (consp x)) :rule-classes :compound-recognizer)