The special tree generation was straightforward translation of Algorithm 1 and only an implementation detail.
The general tree algorithm was also straightforward, a simple implementation of Algorithm 4. We performed no significant optimizations or intelligent tree pruning, aside from early removal of duplicate trees.