pre-analysis to extract locals from application