Basic question: Is PF related to ebpf by any chance?
bpf is a virtual machine to process network packets in kernel space. So it is sort of like the low level assembly language of network processing. It is entirely possible to build a high-level packet filtering language that compiles down to bpf, But I don't think PF does this. PF appears to use it's own specific network processing interface.
Note the pf specific ioctls used to inject rules into the kernel.