Program flow analysis - theory and applications