Semantics of the
We read two unsigned 64-bit integers from
Function:
(defun exec64-bltu (rs1 rs2 imm pc stat) (declare (xargs :guard (and (ubyte5p rs1) (ubyte5p rs2) (ubyte12p imm) (ubyte64p pc) (state64p stat)))) (let ((__function__ 'exec64-bltu)) (declare (ignorable __function__)) (b* ((rs1-operand (read64-xreg-unsigned rs1 stat)) (rs2-operand (read64-xreg-unsigned rs2 stat)) (offset (loghead 64 (logext 13 (ash (ubyte12-fix imm) 1)))) (target-pc (+ (ubyte64-fix pc) offset)) (stat (if (< rs1-operand rs2-operand) (write64-pc target-pc stat) (inc64-pc stat)))) stat)))
Theorem:
(defthm state64p-of-exec64-bltu (b* ((new-stat (exec64-bltu rs1 rs2 imm pc stat))) (state64p new-stat)) :rule-classes :rewrite)
Theorem:
(defthm exec64-bltu-of-ubyte5-fix-rs1 (equal (exec64-bltu (ubyte5-fix rs1) rs2 imm pc stat) (exec64-bltu rs1 rs2 imm pc stat)))
Theorem:
(defthm exec64-bltu-ubyte5-equiv-congruence-on-rs1 (implies (ubyte5-equiv rs1 rs1-equiv) (equal (exec64-bltu rs1 rs2 imm pc stat) (exec64-bltu rs1-equiv rs2 imm pc stat))) :rule-classes :congruence)
Theorem:
(defthm exec64-bltu-of-ubyte5-fix-rs2 (equal (exec64-bltu rs1 (ubyte5-fix rs2) imm pc stat) (exec64-bltu rs1 rs2 imm pc stat)))
Theorem:
(defthm exec64-bltu-ubyte5-equiv-congruence-on-rs2 (implies (ubyte5-equiv rs2 rs2-equiv) (equal (exec64-bltu rs1 rs2 imm pc stat) (exec64-bltu rs1 rs2-equiv imm pc stat))) :rule-classes :congruence)
Theorem:
(defthm exec64-bltu-of-ubyte12-fix-imm (equal (exec64-bltu rs1 rs2 (ubyte12-fix imm) pc stat) (exec64-bltu rs1 rs2 imm pc stat)))
Theorem:
(defthm exec64-bltu-ubyte12-equiv-congruence-on-imm (implies (acl2::ubyte12-equiv imm imm-equiv) (equal (exec64-bltu rs1 rs2 imm pc stat) (exec64-bltu rs1 rs2 imm-equiv pc stat))) :rule-classes :congruence)
Theorem:
(defthm exec64-bltu-of-ubyte64-fix-pc (equal (exec64-bltu rs1 rs2 imm (ubyte64-fix pc) stat) (exec64-bltu rs1 rs2 imm pc stat)))
Theorem:
(defthm exec64-bltu-ubyte64-equiv-congruence-on-pc (implies (acl2::ubyte64-equiv pc pc-equiv) (equal (exec64-bltu rs1 rs2 imm pc stat) (exec64-bltu rs1 rs2 imm pc-equiv stat))) :rule-classes :congruence)
Theorem:
(defthm exec64-bltu-of-state64-fix-stat (equal (exec64-bltu rs1 rs2 imm pc (state64-fix stat)) (exec64-bltu rs1 rs2 imm pc stat)))
Theorem:
(defthm exec64-bltu-state64-equiv-congruence-on-stat (implies (state64-equiv stat stat-equiv) (equal (exec64-bltu rs1 rs2 imm pc stat) (exec64-bltu rs1 rs2 imm pc stat-equiv))) :rule-classes :congruence)