To cover the route, you need to somehow get into the program control flow. The obvious method is to build a real control flow graph and then intersect its segments to highlight “path fragments” (for example, base paths) that will be used in your path coverage analysis. (You can try to do this by hacking the source code, but you are likely to fail; parsing and parsing is too complicated).
See What is the coverage point of the base path? for a good discussion of stackoverflow on basic paths.
To implement the necessary tool to cover the path, you probably need to fully analyze the full inherited language. For 3000 programs and strong testing requirements, the use of an industrial capacity analyzer and infrastructure for this makes sense.
Our DMS Software Reengineering Toolkit can be used to build not only an analyzer, but also an analysis of the control flow and tools needed to collect coverage data paths. ("Industry coverage for arbitrary languages" did this if all you wanted to do was collect branch coverage data, but more for DMS than just parsing). DMS also supports the construction of control schedules (and data flow) if you need them, as you do in this case; see DMS built control flow graphs .
DMS is used to create parsers for analyzing and analyzing data flow for C, Java and COBOL, and was used to create parsers for about 30 + langauges. It can handle your outdated language if you are serious about it.
EDIT 10/31/2011: DMS can now calculate the control flow for C ++, so it will be an excellent basis for a C ++ path coverage tool.
source share