Sorry, "reverse engineering" is clearly a bad choice of words. What I meant was that one aspect (and maybe a goal) of rewriting TeX in OCaml is to reorganize the code from a procedural approach to a functional one, while trying to clean up any accidental complexity. That requires to take some distance with the actual code, and is not easy. That's why there are not many successful TeX rewrites (I can't cite any, but I am interested in knowing if some of them exist).