Generate consequences recursively with depth-first