Converting trees to dags

The problem with the trees generated in the previous section is that there's a different edge, and therefore a different child, for each possible interval of the field tested, even if those children both execute exactly the same ``original'' arm of the case statement. The code in this section converts the trees to dags, and as part of the process it combines edges pointing to the same node. This can reduce the size of the tree by huge factors. To make the transformation work, I have to represent a set of intervals on each edge, not just a single interval. Because no two intervals overlap, I can use a wonderful dirty trick, detailed below. I also may convert a node's name string to a [[namearray]] mapping field values to strings. The goal is for children of the same parent to share a single name array; that way the edges can be merged and the name operator can be implemented with an array reference. If I don't convert a node's name, the only penalty is that the tree might be bigger. (Code generation will be different for the two cases.) @ Now, the dirty representation trick: I can represent a set of numbers S (a union of intervals) as two sets, lo and hi, such that