Given the nature of this algorithm, it would be good to have in-code comments about the steps you are taking. Especially the way the tree develops/is pruned depending on the sub-formulae (And/Or/Literals etc) and boundary cases.