Compile-time Analysis for Program Understanding and Transformation