(vl-check-array-assignpat-keys pairs range) → err
Function:
(defun vl-check-array-assignpat-keys (pairs range) (declare (xargs :guard (and (vl-keyvallist-p pairs) (vl-range-p range)))) (declare (xargs :guard (vl-range-resolved-p range))) (let ((__function__ 'vl-check-array-assignpat-keys)) (declare (ignorable __function__)) (b* ((pairs (vl-keyvallist-fix pairs)) ((when (atom pairs)) nil) (key (caar pairs)) (err (vl-patternkey-case key :expr (if (vl-expr-resolved-p key.key) (if (vl-value-in-range key.key range) nil (vmsg "Key ~a0 not in valid range" key.key)) (vmsg "Key ~a0 not resolved" key.key)) :structmem (vmsg "Struct member name key ~a0 not valid for array patterns." key.name) :type (vmsg "Datatype key ~a0 not valid for array patterns" key.type) :default nil))) (or err (vl-check-array-assignpat-keys (cdr pairs) range)))))
Theorem:
(defthm return-type-of-vl-check-array-assignpat-keys (b* ((err (vl-check-array-assignpat-keys pairs range))) (iff (vl-msg-p err) err)) :rule-classes :rewrite)
Theorem:
(defthm vl-check-array-assignpat-keys-of-vl-keyvallist-fix-pairs (equal (vl-check-array-assignpat-keys (vl-keyvallist-fix pairs) range) (vl-check-array-assignpat-keys pairs range)))
Theorem:
(defthm vl-check-array-assignpat-keys-vl-keyvallist-equiv-congruence-on-pairs (implies (vl-keyvallist-equiv pairs pairs-equiv) (equal (vl-check-array-assignpat-keys pairs range) (vl-check-array-assignpat-keys pairs-equiv range))) :rule-classes :congruence)
Theorem:
(defthm vl-check-array-assignpat-keys-of-vl-range-fix-range (equal (vl-check-array-assignpat-keys pairs (vl-range-fix range)) (vl-check-array-assignpat-keys pairs range)))
Theorem:
(defthm vl-check-array-assignpat-keys-vl-range-equiv-congruence-on-range (implies (vl-range-equiv range range-equiv) (equal (vl-check-array-assignpat-keys pairs range) (vl-check-array-assignpat-keys pairs range-equiv))) :rule-classes :congruence)