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