Cause an error if a value is not a untranslate specifier.
(ensure-is-untranslate-specifier x description error-erp error-val ctx state) → (mv erp val state)
Function:
(defun ensure-is-untranslate-specifier (x description error-erp error-val ctx state) (declare (xargs :stobjs (state))) (declare (xargs :guard (msgp description))) (b* (((unless (untranslate-specifier-p x)) (er-soft+ ctx error-erp error-val "~@0 must be an APT untranslate specifier. ~ See :DOC APT::UNTRANSLATE-SPECIFIER." description))) (value x)))
Theorem:
(defthm return-type-of-ensure-is-untranslate-specifier.erp (b* (((mv ?erp ?val acl2::?state) (ensure-is-untranslate-specifier x description error-erp error-val ctx state))) (implies erp (equal erp error-erp))) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-ensure-is-untranslate-specifier.val (b* (((mv ?erp ?val acl2::?state) (ensure-is-untranslate-specifier x description error-erp error-val ctx state))) (and (implies erp (equal val error-val)) (implies (and (not erp) error-erp) (untranslate-specifier-p val)))) :rule-classes :rewrite)