(vl-gatearg-delayredux delaymod x loc delta) → (mv new-x delta)
Function:
(defun vl-gatearg-delayredux (delaymod x loc delta) (declare (xargs :guard (and (vl-module-p delaymod) (and (vl-plainarg-p x) (vl-gatearg-ok-for-delayredux-p x)) (vl-location-p loc) (vl-delta-p delta)))) (let ((__function__ 'vl-gatearg-delayredux)) (declare (ignorable __function__)) (b* (((vl-plainarg x) x) ((unless (eq x.dir :vl-input)) (mv x delta)) ((unless x.expr) (mv x delta)) ((vl-delta delta) delta) ((mv del-name nf) (vl-namefactory-indexed-name "del" delta.nf)) ((mv mkdel-name nf) (vl-namefactory-indexed-name "mkdel" nf)) ((mv del-expr del-vardecl) (vl-occform-mkwire del-name 1 :loc loc)) (mkdel-inst (vl-simple-instantiate delaymod mkdel-name (list del-expr x.expr) :loc loc)) (delta (change-vl-delta delta :nf nf :vardecls (cons del-vardecl delta.vardecls) :modinsts (cons mkdel-inst delta.modinsts))) (new-x (change-vl-plainarg x :expr del-expr))) (mv new-x delta))))
Theorem:
(defthm vl-plainarg-p-of-vl-gatearg-delayredux.new-x (implies (and (force (vl-module-p delaymod)) (force (if (vl-plainarg-p x) (vl-gatearg-ok-for-delayredux-p$inline x) 'nil)) (force (vl-location-p loc)) (force (vl-delta-p delta))) (b* (((mv ?new-x ?delta) (vl-gatearg-delayredux delaymod x loc delta))) (vl-plainarg-p new-x))) :rule-classes :rewrite)
Theorem:
(defthm vl-delta-p-of-vl-gatearg-delayredux.delta (implies (and (force (vl-module-p delaymod)) (force (if (vl-plainarg-p x) (vl-gatearg-ok-for-delayredux-p$inline x) 'nil)) (force (vl-location-p loc)) (force (vl-delta-p delta))) (b* (((mv ?new-x ?delta) (vl-gatearg-delayredux delaymod x loc delta))) (vl-delta-p delta))) :rule-classes :rewrite)