(vl-lucid-range->bits x ctx) → bits
Function:
(defun vl-lucid-range->bits (x ctx) (declare (xargs :guard (and (vl-range-p x) (any-p ctx)))) (declare (xargs :guard (vl-range-resolved-p x))) (let ((__function__ 'vl-lucid-range->bits)) (declare (ignorable __function__)) (b* (((vl-range x)) (msb (vl-resolved->val x.msb)) (lsb (vl-resolved->val x.lsb)) (min (min msb lsb)) (max (max msb lsb)) ((unless (< max (+ min *vl-lucid-too-many-bits*))) (vl-cw-ps-seq (vl-cw "; ~a0: Whoops, range [~x1:~x2] has too many bits; fudging.~%" ctx msb lsb)) nil)) (ints-from min (+ 1 max)))))
Theorem:
(defthm return-type-of-vl-lucid-range->bits (b* ((bits (vl-lucid-range->bits x ctx))) (and (integer-listp bits) (setp bits))) :rule-classes :rewrite)
Theorem:
(defthm vl-lucid-range->bits-of-vl-range-fix-x (equal (vl-lucid-range->bits (vl-range-fix x) ctx) (vl-lucid-range->bits x ctx)))
Theorem:
(defthm vl-lucid-range->bits-vl-range-equiv-congruence-on-x (implies (vl-range-equiv x x-equiv) (equal (vl-lucid-range->bits x ctx) (vl-lucid-range->bits x-equiv ctx))) :rule-classes :congruence)
Theorem:
(defthm vl-lucid-range->bits-of-identity-ctx (equal (vl-lucid-range->bits x (identity ctx)) (vl-lucid-range->bits x ctx)))
Theorem:
(defthm vl-lucid-range->bits-equal-congruence-on-ctx (implies (equal ctx ctx-equiv) (equal (vl-lucid-range->bits x ctx) (vl-lucid-range->bits x ctx-equiv))) :rule-classes :congruence)