change merging strategy of shape analysis
when two shapes with different size of dimensions merge, grow the
shape with smaller size of dimension to the shape with larger size
of dimension by adding trailing 1s at the end of dimension list.