Cause an error if a true list does not consist of names of existing functions.
(ensure-list-functions list description error-erp error-val ctx state) → (mv erp val state)
Function:
(defun ensure-list-functions (list description error-erp error-val ctx state) (declare (xargs :stobjs (state))) (declare (xargs :guard (and (true-listp list) (msgp description)))) (b* (((unless (and (symbol-listp list) (function-symbol-listp list (w state)))) (er-soft+ ctx error-erp error-val "~@0 must consist of names of existing functions." description))) (value nil)))
Theorem:
(defthm return-type-of-ensure-list-functions.erp (b* (((mv ?erp ?val ?state) (ensure-list-functions list description error-erp error-val ctx state))) (implies erp (equal erp error-erp))) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-ensure-list-functions.val (b* (((mv ?erp ?val ?state) (ensure-list-functions list 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)