Analysis of loops