Validate a designator.
(valid-designor designor target-type table ienv) → (mv erp new-designor new-target-type return-types new-table)
The target type passed as input is the one that the designator must apply to; the target type returned as result is the one that results from applying the designator to it. The target type is the type of the current object [C:6.7.9/17]. A subscript designator requires an array target type, and must have an integer expression [C:6.7.9/6]; the result is the unknown type, because currently we have just one array type without information about the element type. A dotted designator requires a struct or union type [C:6.7.9/7]; the result is the unknown type, because currently we do not have information about the members.
Theorem:
(defthm valid-designor.new-target-type-not-function (b* (((mv acl2::?erp ?new-designor ?new-target-type ?return-types ?new-table) (valid-designor designor target-type table ienv))) (implies (not erp) (not (equal (type-kind new-target-type) :function)))))
Theorem:
(defthm valid-designor.new-target-type-not-void (b* (((mv acl2::?erp ?new-designor ?new-target-type ?return-types ?new-table) (valid-designor designor target-type table ienv))) (implies (not erp) (not (equal (type-kind new-target-type) :void)))))