Semantics of the
We read two signed 32-bit integers from
Function:
(defun exec32-blt (rs1 rs2 imm pc stat) (declare (xargs :guard (and (ubyte5p rs1) (ubyte5p rs2) (ubyte12p imm) (ubyte32p pc) (state32p stat)))) (let ((__function__ 'exec32-blt)) (declare (ignorable __function__)) (b* ((rs1-operand (read32-xreg-signed rs1 stat)) (rs2-operand (read32-xreg-signed rs2 stat)) (offset (loghead 32 (logext 13 (ash (ubyte12-fix imm) 1)))) (target-pc (+ (ubyte32-fix pc) offset)) (stat (if (< rs1-operand rs2-operand) (write32-pc target-pc stat) (inc32-pc stat)))) stat)))
Theorem:
(defthm state32p-of-exec32-blt (b* ((new-stat (exec32-blt rs1 rs2 imm pc stat))) (state32p new-stat)) :rule-classes :rewrite)
Theorem:
(defthm exec32-blt-of-ubyte5-fix-rs1 (equal (exec32-blt (ubyte5-fix rs1) rs2 imm pc stat) (exec32-blt rs1 rs2 imm pc stat)))
Theorem:
(defthm exec32-blt-ubyte5-equiv-congruence-on-rs1 (implies (ubyte5-equiv rs1 rs1-equiv) (equal (exec32-blt rs1 rs2 imm pc stat) (exec32-blt rs1-equiv rs2 imm pc stat))) :rule-classes :congruence)
Theorem:
(defthm exec32-blt-of-ubyte5-fix-rs2 (equal (exec32-blt rs1 (ubyte5-fix rs2) imm pc stat) (exec32-blt rs1 rs2 imm pc stat)))
Theorem:
(defthm exec32-blt-ubyte5-equiv-congruence-on-rs2 (implies (ubyte5-equiv rs2 rs2-equiv) (equal (exec32-blt rs1 rs2 imm pc stat) (exec32-blt rs1 rs2-equiv imm pc stat))) :rule-classes :congruence)
Theorem:
(defthm exec32-blt-of-ubyte12-fix-imm (equal (exec32-blt rs1 rs2 (ubyte12-fix imm) pc stat) (exec32-blt rs1 rs2 imm pc stat)))
Theorem:
(defthm exec32-blt-ubyte12-equiv-congruence-on-imm (implies (acl2::ubyte12-equiv imm imm-equiv) (equal (exec32-blt rs1 rs2 imm pc stat) (exec32-blt rs1 rs2 imm-equiv pc stat))) :rule-classes :congruence)
Theorem:
(defthm exec32-blt-of-ubyte32-fix-pc (equal (exec32-blt rs1 rs2 imm (ubyte32-fix pc) stat) (exec32-blt rs1 rs2 imm pc stat)))
Theorem:
(defthm exec32-blt-ubyte32-equiv-congruence-on-pc (implies (acl2::ubyte32-equiv pc pc-equiv) (equal (exec32-blt rs1 rs2 imm pc stat) (exec32-blt rs1 rs2 imm pc-equiv stat))) :rule-classes :congruence)
Theorem:
(defthm exec32-blt-of-state32-fix-stat (equal (exec32-blt rs1 rs2 imm pc (state32-fix stat)) (exec32-blt rs1 rs2 imm pc stat)))
Theorem:
(defthm exec32-blt-state32-equiv-congruence-on-stat (implies (state32-equiv stat stat-equiv) (equal (exec32-blt rs1 rs2 imm pc stat) (exec32-blt rs1 rs2 imm pc stat-equiv))) :rule-classes :congruence)