Evaluation step from any state that is not final or error.
(step estate program) → new-estate
No evaluation step may take place from a final or error state. Instead, an evaluation step may always take place from an initial or transitional state.
Function:
(defun step (estate program) (declare (xargs :guard (and (eval-state-p estate) (programp program)))) (declare (xargs :guard (not (member-eq (eval-state-kind estate) '(:final :error))))) (let ((__function__ 'step)) (declare (ignorable __function__)) (eval-state-case estate :init (step-from-init estate.function estate.arguments) :trans (step-from-trans estate.stack program) :final (prog2$ (impossible) (eval-state-fix estate)) :error (prog2$ (impossible) (eval-state-fix estate)))))
Theorem:
(defthm eval-state-p-of-step (b* ((new-estate (step estate program))) (eval-state-p new-estate)) :rule-classes :rewrite)
Theorem:
(defthm step-of-eval-state-fix-estate (equal (step (eval-state-fix estate) program) (step estate program)))
Theorem:
(defthm step-eval-state-equiv-congruence-on-estate (implies (eval-state-equiv estate estate-equiv) (equal (step estate program) (step estate-equiv program))) :rule-classes :congruence)
Theorem:
(defthm step-of-program-fix-program (equal (step estate (program-fix program)) (step estate program)))
Theorem:
(defthm step-program-equiv-congruence-on-program (implies (program-equiv program program-equiv) (equal (step estate program) (step estate program-equiv))) :rule-classes :congruence)