(vl-bindelim-modinst-add-atts x intent) → new-x
Function:
(defun vl-bindelim-modinst-add-atts (x intent) (declare (xargs :guard (and (vl-modinst-p x) (vl-bindintent-p intent)))) (let ((__function__ 'vl-bindelim-modinst-add-atts)) (declare (ignorable __function__)) (b* (((vl-modinst x)) ((vl-bindintent intent)) (val (cat "Added by bind statement from " (vl-bindcontext->shortdescription intent.ctx) " at " (vl-location-string (vl-bind->loc intent.source)))) (atts (cons (cons "VL_FROM_BIND" (make-vl-literal :val (make-vl-string :value val))) x.atts))) (change-vl-modinst x :atts atts))))
Theorem:
(defthm vl-modinst-p-of-vl-bindelim-modinst-add-atts (b* ((new-x (vl-bindelim-modinst-add-atts x intent))) (vl-modinst-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-bindelim-modinst-add-atts-of-vl-modinst-fix-x (equal (vl-bindelim-modinst-add-atts (vl-modinst-fix x) intent) (vl-bindelim-modinst-add-atts x intent)))
Theorem:
(defthm vl-bindelim-modinst-add-atts-vl-modinst-equiv-congruence-on-x (implies (vl-modinst-equiv x x-equiv) (equal (vl-bindelim-modinst-add-atts x intent) (vl-bindelim-modinst-add-atts x-equiv intent))) :rule-classes :congruence)
Theorem:
(defthm vl-bindelim-modinst-add-atts-of-vl-bindintent-fix-intent (equal (vl-bindelim-modinst-add-atts x (vl-bindintent-fix intent)) (vl-bindelim-modinst-add-atts x intent)))
Theorem:
(defthm vl-bindelim-modinst-add-atts-vl-bindintent-equiv-congruence-on-intent (implies (vl-bindintent-equiv intent intent-equiv) (equal (vl-bindelim-modinst-add-atts x intent) (vl-bindelim-modinst-add-atts x intent-equiv))) :rule-classes :congruence)