Line up named parameter arguments with parameter declarations.
(vl-make-paramdecloverrides-named formals actuals) → overrides
Function:
(defun vl-make-paramdecloverrides-named (formals actuals) (declare (xargs :guard (and (vl-paramdecllist-p formals) (vl-namedparamvaluelist-p actuals)))) (let ((__function__ 'vl-make-paramdecloverrides-named)) (declare (ignorable __function__)) (b* (((when (atom formals)) nil) ((vl-paramdecl decl1) (vl-paramdecl-fix (car formals))) ((when decl1.localp) (cons (make-vl-paramdecloverride :decl decl1 :override nil) (vl-make-paramdecloverrides-named (cdr formals) actuals))) (look (vl-find-namedparamvalue decl1.name actuals)) (value (and look (vl-namedparamvalue->value look)))) (cons (make-vl-paramdecloverride :decl decl1 :override value) (vl-make-paramdecloverrides-named (cdr formals) actuals)))))
Theorem:
(defthm vl-paramdecloverridelist-p-of-vl-make-paramdecloverrides-named (b* ((overrides (vl-make-paramdecloverrides-named formals actuals))) (vl-paramdecloverridelist-p overrides)) :rule-classes :rewrite)
Theorem:
(defthm vl-make-paramdecloverrides-named-of-vl-paramdecllist-fix-formals (equal (vl-make-paramdecloverrides-named (vl-paramdecllist-fix formals) actuals) (vl-make-paramdecloverrides-named formals actuals)))
Theorem:
(defthm vl-make-paramdecloverrides-named-vl-paramdecllist-equiv-congruence-on-formals (implies (vl-paramdecllist-equiv formals formals-equiv) (equal (vl-make-paramdecloverrides-named formals actuals) (vl-make-paramdecloverrides-named formals-equiv actuals))) :rule-classes :congruence)
Theorem:
(defthm vl-make-paramdecloverrides-named-of-vl-namedparamvaluelist-fix-actuals (equal (vl-make-paramdecloverrides-named formals (vl-namedparamvaluelist-fix actuals)) (vl-make-paramdecloverrides-named formals actuals)))
Theorem:
(defthm vl-make-paramdecloverrides-named-vl-namedparamvaluelist-equiv-congruence-on-actuals (implies (vl-namedparamvaluelist-equiv actuals actuals-equiv) (equal (vl-make-paramdecloverrides-named formals actuals) (vl-make-paramdecloverrides-named formals actuals-equiv))) :rule-classes :congruence)