Turn a stat1 value into a stat value.
(stat-from-stat1 stat1) → stat
A transformation that generates the stobj definition from stat could also generate this conversion function.
This is not quite executable,
because it calls the non-executable
Function:
(defun stat-from-stat1 (stat1) (declare (xargs :stobjs (stat1))) (declare (xargs :guard (stat1p stat1))) (let ((__function__ 'stat-from-stat1)) (declare (ignorable __function__)) (make-stat :xregs (stat1->xregs stat1) :pc (stat1->pc stat1) :memory (stat1->memory stat1) :error (stat1->error stat1))))
Theorem:
(defthm statp-of-stat-from-stat1 (b* ((stat (stat-from-stat1 stat1))) (statp stat)) :rule-classes :rewrite)