Semantics of the instructions with the
Function:
(defun exec-op (funct rd rs1 rs2 stat feat) (declare (xargs :guard (and (op-funct-p funct) (ubyte5p rd) (ubyte5p rs1) (ubyte5p rs2) (statp stat) (featp feat)))) (declare (xargs :guard (stat-validp stat feat))) (let ((__function__ 'exec-op)) (declare (ignorable __function__)) (op-funct-case funct :add (exec-add rd rs1 rs2 stat feat) :sub (exec-sub rd rs1 rs2 stat feat) :slt (exec-slt rd rs1 rs2 stat feat) :sltu (exec-sltu rd rs1 rs2 stat feat) :and (exec-and rd rs1 rs2 stat feat) :or (exec-or rd rs1 rs2 stat feat) :xor (exec-xor rd rs1 rs2 stat feat) :sll (exec-sll rd rs1 rs2 stat feat) :srl (exec-srl rd rs1 rs2 stat feat) :sra (exec-sra rd rs1 rs2 stat feat) :mul (exec-mul rd rs1 rs2 stat feat) :mulh (exec-mulh rd rs1 rs2 stat feat) :mulhu (exec-mulhu rd rs1 rs2 stat feat) :mulhsu (exec-mulhsu rd rs1 rs2 stat feat) :div (exec-div rd rs1 rs2 stat feat) :divu (exec-divu rd rs1 rs2 stat feat) :rem (exec-rem rd rs1 rs2 stat feat) :remu (exec-remu rd rs1 rs2 stat feat))))
Theorem:
(defthm statp-of-exec-op (b* ((new-stat (exec-op funct rd rs1 rs2 stat feat))) (statp new-stat)) :rule-classes :rewrite)
Theorem:
(defthm stat-validp-of-exec-op (implies (stat-validp stat feat) (b* ((?new-stat (exec-op funct rd rs1 rs2 stat feat))) (stat-validp new-stat feat))))
Theorem:
(defthm exec-op-of-op-funct-fix-funct (equal (exec-op (op-funct-fix funct) rd rs1 rs2 stat feat) (exec-op funct rd rs1 rs2 stat feat)))
Theorem:
(defthm exec-op-op-funct-equiv-congruence-on-funct (implies (op-funct-equiv funct funct-equiv) (equal (exec-op funct rd rs1 rs2 stat feat) (exec-op funct-equiv rd rs1 rs2 stat feat))) :rule-classes :congruence)
Theorem:
(defthm exec-op-of-ubyte5-fix-rd (equal (exec-op funct (ubyte5-fix rd) rs1 rs2 stat feat) (exec-op funct rd rs1 rs2 stat feat)))
Theorem:
(defthm exec-op-ubyte5-equiv-congruence-on-rd (implies (ubyte5-equiv rd rd-equiv) (equal (exec-op funct rd rs1 rs2 stat feat) (exec-op funct rd-equiv rs1 rs2 stat feat))) :rule-classes :congruence)
Theorem:
(defthm exec-op-of-ubyte5-fix-rs1 (equal (exec-op funct rd (ubyte5-fix rs1) rs2 stat feat) (exec-op funct rd rs1 rs2 stat feat)))
Theorem:
(defthm exec-op-ubyte5-equiv-congruence-on-rs1 (implies (ubyte5-equiv rs1 rs1-equiv) (equal (exec-op funct rd rs1 rs2 stat feat) (exec-op funct rd rs1-equiv rs2 stat feat))) :rule-classes :congruence)
Theorem:
(defthm exec-op-of-ubyte5-fix-rs2 (equal (exec-op funct rd rs1 (ubyte5-fix rs2) stat feat) (exec-op funct rd rs1 rs2 stat feat)))
Theorem:
(defthm exec-op-ubyte5-equiv-congruence-on-rs2 (implies (ubyte5-equiv rs2 rs2-equiv) (equal (exec-op funct rd rs1 rs2 stat feat) (exec-op funct rd rs1 rs2-equiv stat feat))) :rule-classes :congruence)
Theorem:
(defthm exec-op-of-stat-fix-stat (equal (exec-op funct rd rs1 rs2 (stat-fix stat) feat) (exec-op funct rd rs1 rs2 stat feat)))
Theorem:
(defthm exec-op-stat-equiv-congruence-on-stat (implies (stat-equiv stat stat-equiv) (equal (exec-op funct rd rs1 rs2 stat feat) (exec-op funct rd rs1 rs2 stat-equiv feat))) :rule-classes :congruence)
Theorem:
(defthm exec-op-of-feat-fix-feat (equal (exec-op funct rd rs1 rs2 stat (feat-fix feat)) (exec-op funct rd rs1 rs2 stat feat)))
Theorem:
(defthm exec-op-feat-equiv-congruence-on-feat (implies (feat-equiv feat feat-equiv) (equal (exec-op funct rd rs1 rs2 stat feat) (exec-op funct rd rs1 rs2 stat feat-equiv))) :rule-classes :congruence)