abstracting analysis.cpp