Used to build the tree for procedures.
We will group the procedures with the root procedure, and then validate each group. For each
group of procedures(with the same root procedure), we will collect all the stack ids, if the max
stack id is n, then all the stack ids should be from 0 to n, non-repetition and non-omission. If
not, we will consider all the procedures in this group as corrupted. Please see the code in
For the procedures not in any group, i.e, can not find the root procedure for these procedures,
we will also consider them as corrupted. Please see the code in