Change a named argument list into an equivalent plain (positional) argument list.
(vl-convert-namedargs-aux args ports) → new-args
We walk down the list of ports since they're in the "right" order. For each port, we look up the corresponding argument and build a plainarg for it.
Note: we assume here that
Function:
(defun vl-convert-namedargs-aux (args ports) (declare (xargs :guard (and (vl-namedarglist-p args) (vl-portlist-p ports)))) (declare (xargs :guard (not (member nil (vl-portlist->names ports))))) (let ((__function__ 'vl-convert-namedargs-aux)) (declare (ignorable __function__)) (b* (((when (atom ports)) nil) (namedarg (vl-find-namedarg (vl-port->name (car ports)) args)) (plainarg (if namedarg (make-vl-plainarg :expr (vl-namedarg->expr namedarg) :atts (vl-namedarg->atts namedarg)) (make-vl-plainarg :expr nil :atts '(("VL_MISSING_CONNECTION")))))) (cons plainarg (vl-convert-namedargs-aux args (cdr ports))))))
Theorem:
(defthm vl-plainarglist-p-of-vl-convert-namedargs-aux (b* ((new-args (vl-convert-namedargs-aux args ports))) (vl-plainarglist-p new-args)) :rule-classes :rewrite)
Theorem:
(defthm len-of-vl-convert-namedargs-aux (equal (len (vl-convert-namedargs-aux args ports)) (len ports)))
Theorem:
(defthm vl-convert-namedargs-aux-of-vl-namedarglist-fix-args (equal (vl-convert-namedargs-aux (vl-namedarglist-fix args) ports) (vl-convert-namedargs-aux args ports)))
Theorem:
(defthm vl-convert-namedargs-aux-vl-namedarglist-equiv-congruence-on-args (implies (vl-namedarglist-equiv args args-equiv) (equal (vl-convert-namedargs-aux args ports) (vl-convert-namedargs-aux args-equiv ports))) :rule-classes :congruence)
Theorem:
(defthm vl-convert-namedargs-aux-of-vl-portlist-fix-ports (equal (vl-convert-namedargs-aux args (vl-portlist-fix ports)) (vl-convert-namedargs-aux args ports)))
Theorem:
(defthm vl-convert-namedargs-aux-vl-portlist-equiv-congruence-on-ports (implies (vl-portlist-equiv ports ports-equiv) (equal (vl-convert-namedargs-aux args ports) (vl-convert-namedargs-aux args ports-equiv))) :rule-classes :congruence)