Program-mode interpreter for Imp.
(exec cfg) → *
If the configuration has no commands, we return the final environment. Otherwise, we step the configuration and we recursively call the interprete.
Function:
(defun exec (cfg) (declare (xargs :guard (configp cfg))) (if (consp (config->comms cfg)) (exec (step cfg)) (config->env cfg)))