Types of the values returned by a function, from the validation information.
The set of possible types returned by the function is
the set of possible types returned by the body,
roughly speaking.
More precisely, the latter is a set of optional types,
where
Although a function definition has one return type (possibly
Function:
(defun fundef-types (fundef) (declare (xargs :guard (fundefp fundef))) (declare (xargs :guard (and (fundef-unambp fundef) (fundef-annop fundef)))) (b* ((types (comp-stmt-types (fundef->body fundef))) (types (if (in nil types) (insert (type-void) (delete nil types)) types))) types))
Theorem:
(defthm type-setp-of-fundef-types (b* ((types (fundef-types fundef))) (type-setp types)) :rule-classes :rewrite)
Theorem:
(defthm fundef-types-of-fundef-fix-fundef (equal (fundef-types (fundef-fix fundef)) (fundef-types fundef)))
Theorem:
(defthm fundef-types-fundef-equiv-congruence-on-fundef (implies (fundef-equiv fundef fundef-equiv) (equal (fundef-types fundef) (fundef-types fundef-equiv))) :rule-classes :congruence)