This just seems like a very specific way of implementing tree matching? Top-down graph matching instruction selection implementations look a lot like this if you squint (apply labels to child nodes, then have rules that fire on simple trees of labels, which gives you structural sharing of rules) but without the multiple explicit node types and specifying exactly a linked list and things. It being so specific to the implementation and not a high level overview of what the algorithm is trying to do is kinda weird and make it hard to understand, honestly.