def jmp_ranges
bend-osdev-bpf@0.1.0.0 · PROOF.bend:105
import bend-osdev-bpf@0.1.0.0/PROOF.bend as PROOF
import Base
import bend-osdev-bpf@0.1.0.0/insn.bend as I
import bend-osdev-bpf@0.1.0.0/validate.bend as V
105
106def jmp_ranges(+jt: U32, +jf: U32, +pc: Nat, +r: Nat, +h: {V.bpf_check.jmp(jt, jf, pc, r) == Done{Unit{}} : Result<&2, &2, I.BpfError, Unit>}) -> {V.bpf_both(V.bpf_chk(Nat.is_lt(U32.to_nat(jt), r), I.BpfErrJump{pc}), V.bpf_chk(Nat.is_lt(U32.to_nat(jf), r), I.BpfErrJump{pc})) == Done{Unit{}} : Result<&2, &2, I.BpfError, Unit>}:
107 both_r(V.bpf_chk(U32.is_lt(jf, 256), I.BpfErrJumpField{pc}), V.bpf_both(V.bpf_chk(Nat.is_lt(U32.to_nat(jt), r), I.BpfErrJump{pc}), V.bpf_chk(Nat.is_lt(U32.to_nat(jf), r), I.BpfErrJump{pc})), both_r(V.bpf_chk(U32.is_lt(jt, 256), I.BpfErrJumpField{pc}), V.bpf_both(V.bpf_chk(U32.is_lt(jf, 256), I.BpfErrJumpField{pc}), V.bpf_both(V.bpf_chk(Nat.is_lt(U32.to_nat(jt), r), I.BpfErrJump{pc}), V.bpf_chk(Nat.is_lt(U32.to_nat(jf), r), I.BpfErrJump{pc}))), h))