Cause an error if a term has output stobjs.
(ensure-term-no-stobjs stobjs-out description error-erp error-val ctx state) → (mv erp val state)
Function:
(defun ensure-term-no-stobjs (stobjs-out description error-erp error-val ctx state) (declare (xargs :stobjs (state))) (declare (xargs :guard (and (symbol-listp stobjs-out) (msgp description)))) (b* (((unless (all-nils stobjs-out)) (er-soft+ ctx error-erp error-val "~@0 must have no (output) stobjs." description))) (value nil)))
Theorem:
(defthm return-type-of-ensure-term-no-stobjs.erp (b* (((mv ?erp ?val ?state) (ensure-term-no-stobjs stobjs-out description error-erp error-val ctx state))) (implies erp (equal erp error-erp))) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-ensure-term-no-stobjs.val (b* (((mv ?erp ?val ?state) (ensure-term-no-stobjs stobjs-out description error-erp error-val ctx state))) (and (implies erp (equal val error-val)) (implies (and (not erp) error-erp) (not val)))) :rule-classes :rewrite)