(vl-castexpr->datatype x ss) → (mv warning type)
Function:
(defun vl-castexpr->datatype (x ss) (declare (xargs :guard (and (vl-expr-p x) (vl-scopestack-p ss)))) (let ((__function__ 'vl-castexpr->datatype)) (declare (ignorable __function__)) (b* ((x (vl-expr-fix x)) ((unless (vl-atom-p x)) (mv (make-vl-warning :type :vl-castexpr->datatype-fail :msg "Couldn't resolve type of ~a0 (not implemented)." :args (list x)) nil)) ((vl-atom x)) ((when (eq (tag x.guts) :vl-basictype)) (vl-basictype->datatype (vl-basictype->kind x.guts))) ((unless (eq (tag x.guts) :vl-typename)) (mv (make-vl-warning :type :vl-castexpr->datatype-fail :msg "Couldn't resolve type of ~a0 (not implemented)." :args (list x)) nil))) (vl-datatype-usertype-elim (make-vl-usertype :kind x) ss 100))))
Theorem:
(defthm return-type-of-vl-castexpr->datatype.warning (b* (((mv common-lisp::?warning common-lisp::?type) (vl-castexpr->datatype x ss))) (iff (vl-warning-p warning) warning)) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-vl-castexpr->datatype.type (b* (((mv common-lisp::?warning common-lisp::?type) (vl-castexpr->datatype x ss))) (implies (not warning) (vl-datatype-p type))) :rule-classes :rewrite)
Theorem:
(defthm vl-castexpr->datatype-of-vl-expr-fix-x (equal (vl-castexpr->datatype (vl-expr-fix x) ss) (vl-castexpr->datatype x ss)))
Theorem:
(defthm vl-castexpr->datatype-vl-expr-equiv-congruence-on-x (implies (vl-expr-equiv x x-equiv) (equal (vl-castexpr->datatype x ss) (vl-castexpr->datatype x-equiv ss))) :rule-classes :congruence)
Theorem:
(defthm vl-castexpr->datatype-of-vl-scopestack-fix-ss (equal (vl-castexpr->datatype x (vl-scopestack-fix ss)) (vl-castexpr->datatype x ss)))
Theorem:
(defthm vl-castexpr->datatype-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-castexpr->datatype x ss) (vl-castexpr->datatype x ss-equiv))) :rule-classes :congruence)