Given an alist mapping each driven variable to its list of segment drivers, resolve this to an svex-alist mapping each variable to its full assignment.
(segment-driver-map-resolve x) → assigns
This applies segment-driverlist-resolve to the list of drivers for each variable.
Function:
(defun segment-driver-map-resolve (x) (declare (xargs :guard (segment-driver-map-p x))) (let ((__function__ 'segment-driver-map-resolve)) (declare (ignorable __function__)) (mbe :logic (b* (((when (atom x)) nil) ((unless (mbt (and (consp (car x)) (svar-p (caar x))))) (segment-driver-map-resolve (cdr x))) ((cons name drivers) (car x)) (value (segment-driverlist-resolve drivers))) (cons (cons name value) (segment-driver-map-resolve (cdr x)))) :exec (if (atom x) nil (acl2::with-local-nrev (segment-driver-map-resolve-nrev x acl2::nrev))))))
Theorem:
(defthm svex-alist-p-of-segment-driver-map-resolve (b* ((assigns (segment-driver-map-resolve x))) (svex-alist-p assigns)) :rule-classes :rewrite)
Theorem:
(defthm vars-of-segment-driver-map-resolve (implies (not (member v (segment-driver-map-vars x))) (and (not (member v (svex-alist-keys (segment-driver-map-resolve x)))) (not (member v (svex-alist-vars (segment-driver-map-resolve x)))))))
Theorem:
(defthm svex-lookup-under-iff-of-segment-driver-map-resolve (b* ((?assigns (segment-driver-map-resolve x))) (iff (svex-lookup v assigns) (hons-assoc-equal (svar-fix v) (segment-driver-map-fix x)))))
Theorem:
(defthm segment-driver-map-resolve-of-segment-driver-map-fix-x (equal (segment-driver-map-resolve (segment-driver-map-fix x)) (segment-driver-map-resolve x)))
Theorem:
(defthm segment-driver-map-resolve-segment-driver-map-equiv-congruence-on-x (implies (segment-driver-map-equiv x x-equiv) (equal (segment-driver-map-resolve x) (segment-driver-map-resolve x-equiv))) :rule-classes :congruence)