The number of
These is 32 for the RV32I and RV64I bases, but it is reduced to 16 for the RV32E and RV64E bases [ISA:3]. Although our features do not yet model the latter bases, we define this operation so that other code can use it and more easily accommodate the extension for RV32E/RV64E.
Function:
(defun feat->xnum (feat) (declare (xargs :guard (featp feat))) (declare (ignore feat)) (let ((__function__ 'feat->xnum)) (declare (ignorable __function__)) 32))
Theorem:
(defthm posp-of-feat->xnum (b* ((xnum (feat->xnum feat))) (posp xnum)) :rule-classes :rewrite)
Theorem:
(defthm feat->xnum-of-feat-fix-feat (equal (feat->xnum (feat-fix feat)) (feat->xnum feat)))
Theorem:
(defthm feat->xnum-feat-equiv-congruence-on-feat (implies (feat-equiv feat feat-equiv) (equal (feat->xnum feat) (feat->xnum feat-equiv))) :rule-classes :congruence)