Map an initializer with optional designations to an initializer expression in the language definition.
(ldm-desiniter desiniter) → (mv erp expr)
There must be no designators, and the nested initializer must be for a single expression.
Function:
(defun ldm-desiniter (desiniter) (declare (xargs :guard (desiniterp desiniter))) (declare (xargs :guard (desiniter-unambp desiniter))) (let ((__function__ 'ldm-desiniter)) (declare (ignorable __function__)) (b* (((reterr) (c::expr-ident (c::ident "irrelevant"))) ((desiniter desiniter) desiniter) ((when desiniter.designors) (reterr (msg "Unsupported designators ~x0." desiniter.designors))) ((unless (initer-case desiniter.initer :single)) (reterr (msg "Unsupported nested initializer ~x0." desiniter.initer)))) (ldm-expr (initer-single->expr desiniter.initer)))))
Theorem:
(defthm exprp-of-ldm-desiniter.expr (b* (((mv acl2::?erp ?expr) (ldm-desiniter desiniter))) (c::exprp expr)) :rule-classes :rewrite)
Theorem:
(defthm ldm-desiniter-of-desiniter-fix-desiniter (equal (ldm-desiniter (desiniter-fix desiniter)) (ldm-desiniter desiniter)))
Theorem:
(defthm ldm-desiniter-desiniter-equiv-congruence-on-desiniter (implies (desiniter-equiv desiniter desiniter-equiv) (equal (ldm-desiniter desiniter) (ldm-desiniter desiniter-equiv))) :rule-classes :congruence)