1. A method in a computer environment for analyzing a regular tree pattern, the computer environment comprising at least one computer processor and computer-readable memory, the method comprising: receiving data comprising a regular tree pattern comprising at least one of a sequence and a set; when the tree pattern comprises a sequence, determining a first machine corresponding to the sequence; when the tree pattern comprises a set, determining a second machine corresponding to the set; creating a union of the first and second machines; determining a set of labeled acceptance states for the union of the machines; determining from the labeled acceptance states a sub-type relationship for the first and second machine.