Remove array write method calls from a block.
This puts together the two transformations described in atj-post-translation-remove-array-write-calls.
We also ensure that, after the transformations, no more array write method calls remain.
Function:
(defun atj-remove-array-write-calls (block) (declare (xargs :guard (jblockp block))) (let ((__function__ 'atj-remove-array-write-calls)) (declare (ignorable __function__)) (b* ((block (atj-remove-array-write-call-asgs-in-jblock block)) (block (atj-remove-array-write-call-returns-in-jblock block)) ((unless (atj-ensure-no-array-write-calls block)) (raise "Internal error: ~ the block ~x0 contains array write method calls." block))) block)))
Theorem:
(defthm jblockp-of-atj-remove-array-write-calls (b* ((new-block (atj-remove-array-write-calls block))) (jblockp new-block)) :rule-classes :rewrite)
Theorem:
(defthm atj-remove-array-write-calls-of-jblock-fix-block (equal (atj-remove-array-write-calls (jblock-fix block)) (atj-remove-array-write-calls block)))
Theorem:
(defthm atj-remove-array-write-calls-jblock-equiv-congruence-on-block (implies (jblock-equiv block block-equiv) (equal (atj-remove-array-write-calls block) (atj-remove-array-write-calls block-equiv))) :rule-classes :congruence)