Process the
(defobject-process-init init type wrld) → (mv erp initer?)
We ensure that it is either
Function:
(defun defobject-process-init (init type wrld) (declare (xargs :guard (and (typep type) (plist-worldp wrld)))) (let ((__function__ 'defobject-process-init)) (declare (ignorable __function__)) (b* (((reterr) (irr-initer)) ((when (null init)) (retok nil))) (cond ((type-integerp type) (b* (((erp expr) (defobject-process-init-term init type wrld))) (retok (initer-single expr)))) ((type-case type :array) (b* (((unless (true-listp init)) (reterr (msg "Since the object's type is ~x0, ~ the :INIT input must be a list, ~ but it is ~x0 instead." type init))) (elemtype (type-array->of type)) (size (type-array->size type)) ((unless (equal (len init) size)) (reterr (msg "The number ~x0 of elements of the :INIT input ~ must match the size ~x1 of the array ~ specified by the :TYPE input." (len init) size))) ((erp exprs) (defobject-process-init-terms init elemtype wrld))) (retok (initer-list exprs)))) (t (reterr (raise "Internal error: type ~x0." type)))))))