Gather lvalue-position expressions from a vl-plainarg-p.
(vl-plainarg-lvalexprs x) → exprs
Function:
(defun vl-plainarg-lvalexprs (x) (declare (xargs :guard (vl-plainarg-p x))) (let ((__function__ 'vl-plainarg-lvalexprs)) (declare (ignorable __function__)) (mbe :logic (b* ((x (vl-plainarg-fix x))) (b* (((vl-plainarg x) x)) (cond ((not x.expr) nil) ((not x.dir) nil) ((or (eq x.dir :vl-output) (eq x.dir :vl-inout)) (cond ((assoc-equal "VL_UNSET_OUTPUT" x.atts) nil) ((vl-expr-lvaluep x.expr) (list x.expr)) (t nil))) ((assoc-equal "VL_LVALUE_INPUT" x.atts) (if (vl-expr-lvaluep x.expr) (list x.expr) nil)) (t nil)))) :exec (with-local-nrev (vl-plainarg-lvalexprs-nrev x nrev)))))
Theorem:
(defthm vl-exprlist-p-of-vl-plainarg-lvalexprs (b* ((exprs (vl-plainarg-lvalexprs x))) (vl-exprlist-p exprs)) :rule-classes :rewrite)
Theorem:
(defthm vl-plainarg-lvalexprs-nrev-removal (equal (vl-plainarg-lvalexprs-nrev x nrev) (append nrev (vl-plainarg-lvalexprs x))))
Theorem:
(defthm true-listp-of-vl-plainarg-lvalexprs (true-listp (vl-plainarg-lvalexprs x)) :rule-classes :type-prescription)
Theorem:
(defthm vl-exprlist-lvaluesp-of-vl-plainarg-lvalexprs (vl-exprlist-lvaluesp (vl-plainarg-lvalexprs x)))
Theorem:
(defthm vl-plainarg-lvalexprs-of-vl-plainarg-fix-x (equal (vl-plainarg-lvalexprs (vl-plainarg-fix x)) (vl-plainarg-lvalexprs x)))
Theorem:
(defthm vl-plainarg-lvalexprs-vl-plainarg-equiv-congruence-on-x (implies (vl-plainarg-equiv x x-equiv) (equal (vl-plainarg-lvalexprs x) (vl-plainarg-lvalexprs x-equiv))) :rule-classes :congruence)