(vl-portdecl-type-set-signed type elem) → (mv successp warnings new-type)
Function:
(defun vl-portdecl-type-set-signed (type elem) (declare (xargs :guard (and (vl-datatype-p type) (vl-modelement-p elem)))) (let ((__function__ 'vl-portdecl-type-set-signed)) (declare (ignorable __function__)) (b* ((elem (vl-modelement-fix elem)) (type (vl-datatype-fix type)) ((fun (badtype type elem)) (mv nil (list (make-vl-warning :type :vl-portdecl-sign-fail :msg "~a0: Don't know how to change the sign of datatype ~ ~a1 to be signed" :args (list elem type) :fatalp t)) type))) (if (consp (vl-datatype->udims type)) (badtype type elem) (vl-datatype-case type :vl-coretype (mv t nil (change-vl-coretype type :signedp t)) :vl-struct (mv t nil (change-vl-struct type :signedp t)) :vl-union (mv t nil (change-vl-union type :signedp t)) :otherwise (badtype type elem))))))
Theorem:
(defthm vl-warninglist-p-of-vl-portdecl-type-set-signed.warnings (b* (((mv ?successp ?warnings ?new-type) (vl-portdecl-type-set-signed type elem))) (vl-warninglist-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-datatype-p-of-vl-portdecl-type-set-signed.new-type (b* (((mv ?successp ?warnings ?new-type) (vl-portdecl-type-set-signed type elem))) (vl-datatype-p new-type)) :rule-classes :rewrite)