Execute a path.
(exec-path path cstate) → outcome
We look up the variable in the computation state. This always returns a single value, and does not change the computation state.
Function:
(defun exec-path (path cstate) (declare (xargs :guard (and (pathp path) (cstatep cstate)))) (let ((__function__ 'exec-path)) (declare (ignorable __function__)) (b* (((okf var) (path-to-var path)) ((okf val) (read-var-value var cstate))) (make-eoutcome :cstate cstate :values (list val)))))
Theorem:
(defthm eoutcome-resultp-of-exec-path (b* ((outcome (exec-path path cstate))) (eoutcome-resultp outcome)) :rule-classes :rewrite)
Theorem:
(defthm error-info-wfp-of-exec-path (b* ((?outcome (exec-path path cstate))) (implies (reserrp outcome) (error-info-wfp outcome))))
Theorem:
(defthm exec-path-of-path-fix-path (equal (exec-path (path-fix path) cstate) (exec-path path cstate)))
Theorem:
(defthm exec-path-path-equiv-congruence-on-path (implies (path-equiv path path-equiv) (equal (exec-path path cstate) (exec-path path-equiv cstate))) :rule-classes :congruence)
Theorem:
(defthm exec-path-of-cstate-fix-cstate (equal (exec-path path (cstate-fix cstate)) (exec-path path cstate)))
Theorem:
(defthm exec-path-cstate-equiv-congruence-on-cstate (implies (cstate-equiv cstate cstate-equiv) (equal (exec-path path cstate) (exec-path path cstate-equiv))) :rule-classes :congruence)