Top frame of a computation state's call stack.
(top-frame compst) → frame
Function:
(defun top-frame (compst) (declare (xargs :guard (compustatep compst))) (declare (xargs :guard (> (compustate-frames-number compst) 0))) (let ((__function__ 'top-frame)) (declare (ignorable __function__)) (frame-fix (car (compustate->frames compst)))))
Theorem:
(defthm framep-of-top-frame (b* ((frame (top-frame compst))) (framep frame)) :rule-classes :rewrite)
Theorem:
(defthm top-frame-of-push-frame (equal (top-frame (push-frame frame compst)) (frame-fix frame)))
Theorem:
(defthm top-frame-of-compustate-fix-compst (equal (top-frame (compustate-fix compst)) (top-frame compst)))
Theorem:
(defthm top-frame-compustate-equiv-congruence-on-compst (implies (compustate-equiv compst compst-equiv) (equal (top-frame compst) (top-frame compst-equiv))) :rule-classes :congruence)