Read the program counter.
(read-pc stat feat) → pc
The result is always an unsigned
Function:
(defun read-pc (stat feat) (declare (xargs :guard (and (statp stat) (featp feat)))) (declare (xargs :guard (stat-validp stat feat))) (let ((__function__ 'read-pc)) (declare (ignorable __function__)) (unsigned-byte-fix (feat->xlen feat) (stat->pc stat))))
Theorem:
(defthm return-type-of-read-pc (b* ((pc (read-pc stat feat))) (unsigned-byte-p (feat->xlen feat) pc)) :rule-classes :rewrite)
Theorem:
(defthm natp-of-read-pc (b* ((pc (read-pc stat feat))) (natp pc)) :rule-classes :type-prescription)
Theorem:
(defthm ubyte32p-of-read-pc (implies (and (stat-validp stat feat) (feat-32p feat)) (b* ((acl2::?pc (read-pc stat feat))) (ubyte32p pc))))
Theorem:
(defthm ubyte64p-of-read-pc (implies (and (stat-validp stat feat) (feat-64p feat)) (b* ((acl2::?pc (read-pc stat feat))) (ubyte64p pc))))
Theorem:
(defthm read-pc-of-stat-fix-stat (equal (read-pc (stat-fix stat) feat) (read-pc stat feat)))
Theorem:
(defthm read-pc-stat-equiv-congruence-on-stat (implies (stat-equiv stat stat-equiv) (equal (read-pc stat feat) (read-pc stat-equiv feat))) :rule-classes :congruence)
Theorem:
(defthm read-pc-of-feat-fix-feat (equal (read-pc stat (feat-fix feat)) (read-pc stat feat)))
Theorem:
(defthm read-pc-feat-equiv-congruence-on-feat (implies (feat-equiv feat feat-equiv) (equal (read-pc stat feat) (read-pc stat feat-equiv))) :rule-classes :congruence)