next up previous contents
Next: Development and Operational Environments Up: General Description Previous: ConstraintsAssumptions, and Dependencies

Possible future enhancements

A number of possible enhancements were considered during the development of the CCA utility. They were, for various reasons, left out of the design. They are listed here just in case someone wants to take the time in the future to expand this utility.

The ability to scale graphical output for printing on multiple paper sizes is a viable future enhancement. This was not attempted due to the complications it would introduce into the PostScript algorithms within the code. Our graphical output is drawn in a grid framework. The grid squares were designed to fit letter-sized paper. The dimensions of other paper sizes have different ratios between the height and width of the paper, complicating the fitting of grid squares onto the paper. This was not considered a terribly complicated problem, simply one which we felt would potentially introduce too many new bugs into the code at a late point in the development cycle.

Another really nifty enhancement would be to highlight the actual path taken through the code (in the graphical output) given a set of user entered defines, or simply given the #defines within the input file. This would entail writing an expression parser to determine the TRUE or FALSE values for the #if's and #elif's, creating a dynamic symbol table of defined constants within the input file, and making very slight modifications to the PostScript functions which generate the graphical output. This was definately outside the scope of a semester long project, but we feel that this would be a valuable tool for analyzing the conditional compilation code within a large C file.

It was also realized that it would be trivial to extend the focus of this utility to include ALL conditional code, not simply preprocessor directive conditionals. The logical paths and nesting levels of all conditional logic could be very easily displayed in the graphical output. One thing to consider here, though, is the fact is that the C conditionals and the preprocessor conditionals can overlap each other. All paths would be hard to graph, but a particular path, given a set of defined constants could be displayed.

Another enhancement which would be relatively simple to achieve would be to display the nesting level of each conditional statement in the textual summary. This would simply require adding another column to the list, with a number indicating the nesting depth a conditional occured at. This data is trivial to derive.

Multiple file handling was considered by several people involved in the project. While this is easily achieved by wrapping the cca exectable into a shell or Perl script, it might be desireable to add this feature to the cca command line. This might be extended to allow for wildcard pattern mathing.


next up previous contents
Next: Development and Operational Environments Up: General Description Previous: ConstraintsAssumptions, and Dependencies