@akkartik I'm doing it per-routine at the moment, I'm not looking to doing it at the program scale since there's lots of I/O and optimisations going on.
It finds some routines as linear, others as safe, and most as crazy unsafe. But I would at least be able to rate the different levels of safety in terms of routines. Most routines do away with load/save operations altogether by using only stack opcodes, making it easy to "rasterize".