10 December 2001
David Larochelle
12
Loop Heuristics
•Recognize common loop idioms
•Use heuristics to guess number of iterations
•Analyze first and last iterations
•Example:
–for (init; *buf; buf++)
–Assume maxRead(buf) iterations
–Model first and last iterations