Cause an error if a term calls a given function.
(ensure-term-does-not-call term fn description error-erp error-val ctx state) → (mv erp val state)
Function:
(defun ensure-term-does-not-call (term fn description error-erp error-val ctx state) (declare (xargs :stobjs (state))) (declare (xargs :guard (and (pseudo-termp term) (symbolp fn) (msgp description)))) (b* (((when (ffnnamep fn term)) (er-soft+ ctx error-erp error-val "~@0 must not call ~x1." description fn))) (value nil)))
Theorem:
(defthm return-type-of-ensure-term-does-not-call.erp (b* (((mv ?erp ?val ?state) (ensure-term-does-not-call term fn description error-erp error-val ctx state))) (implies erp (equal erp error-erp))) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-ensure-term-does-not-call.val (b* (((mv ?erp ?val ?state) (ensure-term-does-not-call term fn 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)