What graph(s) do you want to rewrite? How would this help with respect to A, B, and C? The program is a term (tree), the runtime data structure (heap) is a graph - you want rewriting at run-time then? But the purpose is to move work from run-time to compile-time. - J.W.