Control Flow Graphs

VectorCAST version 2019 supports the capability to display and graphically visualize control flow and code coverage. This feature can be accessed by enabling Control Flow from within the Custom Tools menu.

Figure 1. Edit Custom Tools

Figure 2. Control Flow Graph Tool

Figure 3. Control Flow Graph Tool Icon in Toolbar

The Control Flow Graph works from within both the Cover and Unit Test Environmets, it uses the context from within the unit/subprogram hierarchy (Unit Test) or file-level (Cover).

Depending on which level in the environment is selected, a pull down menu shows up with the routines and units.

Figure 4: Routines available

When you select an item from this list, it then displays the graph inside of the MDI.

In the Unit Test tool:

  • If you don’t have a subprogram or unit selected, then the drop-down shows all units/subprograms. 
  • If you have a unit selected, then it only shows the subprograms from that unit. 
  • If you have a subprogram selected, the the control flow graph is automatically loaded for you
  • If you’re working with branch-only coverage (either Branch or MCDC) then you get an “uncoloured” graph
  • If you’re working with statement-only coverage, then nodes are either green (covered) or red (uncovered)
  • If you’re working with statement+branch or statement+MCDC then you also get orange nodes (for something that is partially covered)

Control Flow Graphs are generated as SVG (scalable vector graphics), the MDI displays these like a HTML document.

If the graph is not of ideal size, zoom is enabled, normal MDI behavior. These files can also be exported or saved for future references and are able to be embedded inside of reports.

See also this video tutorial.

Article ID: 1612
Last updated: 2020-02-06
Revision: 3
VectorCAST -> New Features from 2019 -> Control Flow Graphs