Heuristically estimate an expression's size.
(vl-expr-probable-selfsize x ss) → size
There's no reason to believe the size it returns will be the
eventual size of the expression because size propagation hasn't been taken into
account; in fact we may just fail and return
On the other hand, I think it should be the case that the final size of the
expression will always be at least as much as this selfsize, if it returns a
non-
Function:
(defun vl-expr-probable-selfsize (x ss) (declare (xargs :guard (and (vl-expr-p x) (vl-scopestack-p ss)))) (let ((__function__ 'vl-expr-probable-selfsize)) (declare (ignorable __function__)) (b* (((mv & size) (vl-expr-selfsize x ss *fake-modelement* nil))) size)))
Theorem:
(defthm maybe-natp-of-vl-expr-probable-selfsize (b* ((size (vl-expr-probable-selfsize x ss))) (maybe-natp size)) :rule-classes :type-prescription)