When the user wants both a full summary report and graph output (on one page)
written to files.
cca -CDELTV -f foo.c -o foo.out -gp foo.ps
The messages printed to STDOUT are:
Processing file... Verifying conditional logic... Generating image... Generating report... Done!
The file foo.out contains the summary report:
Summary Report for foo.c :
Analysis Options Specified:
C : Display Comprehensive Conditional Logic Listing
D : Display Conditional Directive Summary
E : Display Conditional Expression Summary
L : Display Total Lines of Code
T : Display Total Lines of Conditional Compilation Logic
V : Display V(g) and V'(g) for Conditional Logic
Code Analysis Summary:
Total Lines of Code: 30
Total Lines of CC Logic: 12
Total V(g) for CCDs: 6
Total V'(g) for CCDs: 6
Directive Use Summary:
1 #if
1 #ifdef
2 #ifndef
3 #else
1 #elif
4 #endif
Expression Use Summary:
1 FOO
1 N
1 N == 13
1 N == 42
1 TIME
Complete Conditional Logic Listing:
Line# CCD Expression
----------------------------------------------
2 #ifndef FOO
6 #else
9 #endif
12 #ifdef N
13 #if N == 42
15 #elif N == 13
17 #else
20 #ifndef TIME
22 #endif
23 #endif
24 #else
28 #endif
*** End of Analysis Summary ***
The graph saved in foo.ps is shown in Figure 1
Figure 1: Sample output