seal5.transform.detect_branches

Recognize conditional PC-relative RISC-V branch behaviors.

Functions

detect_branch(operation, operands)

Return a lowered operation, or the original if any behavior is unproven.

pc_relative_offset(expr)

Match PC = PC + immediate, accepting explicit XLEN/sign casts.

pure_condition(expr)

Only branch conditions composed of fields, literals and integer registers.

statements(expr)

Unwrap nested single blocks without discarding statements.

strip_casts(expr)

Classes

BranchIntrinsic(condition, offset[, line_info])

Pattern-gen branch with its original displacement retained in the model.