almost add all the features to support numbering of edges in the heap, and instantiation, but the cache version is not done. need testing, also have not considered the various invokes, e.g. virtual invoke, static invoke