The Development Assistant For C Programming |
The future of intelligent program editing
Since the dawn of programming the humble editor has been the standard tools for writing source code. While CASE tools have developed in leaps and bounds the tools available to the programmer have not substantially changed from the original text editors. The purpose of this article is to examine a new generation of windows based editors that substantially assist a C programmer to produce high quality, reliable and well documented C code.
| The Development Assistant is a unique programming tool designed to work with ANSI C and all the extensions to C used by embedded compilers such as Keil, Tasking, Cosmic, IAR etc. |
Static Code Analyzer
The heart of the Development Assistant is a static code analyzer. All programming
errors that are normally caught by the compiler and linker can be detected
by the analyzer. The advantage of the analyzer is that it is faster to run
and it can detect a wider range of programming errors than the compiler and
linker alone. The weaknesses of error detection with a compile and link process
come from their design: the compiler looks at just one module at a time, and
the information that it provides to the linker lacks some clues that would
indicate programming errors. But the Analyzer behaves differently: compilation
and linking are a part of the same analysis session allowing many common programming
errors to be detected and trapped very early in the development process. The
development assistant will also check for the correct usage of any proprietary
extensions to the C language used by embedded compilers.
| The analyzer is also used to produce a database of all the symbols used in your code and their exact scope this database is used by the other tools in the the Development assistant. Since each symbol is recognised in its exact scope global searches can be much more precise. The database is kept as an external file so no tags or comments are added to your source code. This also allows existing code to be imported into the Development assistant so it is possible to use the Development Assistant on current projects or legacy code. |
The New Horizon
One of the most useful features in the development assistant is the code browser.
Within the editor you can click on any symbol be it a variable or function
and then get a list of every use of that symbol in the code. With a second
click you can then jump directly to any of these points in the original source.
You can examine functions on the basis of definition, calls to, calls within
and uses of variables within. In addition you can examine variables by definition,uses
and assignments. The browser makes your code as easy to navigate as HTML and
unlike simple search tools the browser does not get confused by different variables
with the same name.
| While the browser is extremely useful during development it becomes truly indispensable tool for maintaining or making minor changes to existing code. If you are working with legacy code the browser will bring a confusing morass of code rapidly under control. |
Editor With Flow-Charting
| The Development Assistant can also automatically generate flow charts of the source code. The skeleton of the flow chart is constructed from the Development Assistant's understanding of C and the comments are used to annotate the flow chart boxes. Two types of chart are available, a traditional flow chart which is useful for displaying the algorithm used by a C program but is quite abstract from the C code itself. The second chart is called a Nassi Snidermann Structogram and displays the C code as a series of graphical objects which display the actual structure of the C program. |
This kind of chart is very useful for refining code and analyzing the flow of execution through a program. Since the flow charts are generated `on the fly' they will always represent the current status of the C code and as such can be printed out and used in code reviews, walk throughs etc.
Call- And Type-Hierarchy Graph
| The Graph feature is not limited to functions, program data can also be displayed in graphical format. It can display any type definition or structure that is used in your source too and give you its graphical representation. |
| This is still not all that the Graph can do. A variety of possibilities for grouping the functions or subgroups for better clarity on the level of the project or its logical wholes. In this way by choosing Module view, a predefined way of grouping the design of the application or any of its parts can be displayed. |
For complex programs the hierarchy graphs can become very large. In order to print these diagrams out, the DA-C allows you to "mosaic" print the graph onto several sheets of paper so you can then reconstruct the large diagram.
Software Metrics For More Quality
| The Development Assistant also contains a powerful metrics module which can be used to analyze the quality of your source code. The metrics module implements all the most useful software metrics developed for ANSI C. It allows a user to define a metrics template which will apply a set of selected metrics to the sorce code. |
By defining several such templates the software may be evaluated with varying criteria: the test department will be more interested in metrics enabling the evaluation of the testing time, the quality department will be more interested in parameters enabling the evaluation of software quality (documentation, complexity), and the management will be interested in the metrics for the evaluation of the state of the project, capacity planning, software maintenance, etc.
Project Manager
| The Project Manager offers three possibilities to organize and show relevant project data: Explorer View, Folder View and Logical View. The explorer view will show a standard view of the directory structure on your hard drive; folder view will only show those directories relevant to the project and logical view will group each file type into a logical folder, so you have one folder with all your C files, one with the include files and one with your documentation etc. |
Each of these views is automatically constructed and does not depend on the existing directory structure of a project. Every file can also be assigned an alias so you can keep the limitations of the old DOS 8.3 character naming rule and still give each file a meaningful name. Once the project has been defined it is also possible to integrate the Development Assistant with external compiler tools, debuggers and version control systems.
HiTOP Debugger Interface| To provide a full development environment, the DA-C can integrate with leading debugging environments through a DAPI interface. Via this interface, DA-C can exchange messages with debuggers that are connected to it. The advantages of such connection are manifested in the fact that it is possible to set or delete break points from within DA-C (in an editor, flow chart, graph and browser) single step the code run and halt the application. With this technique, both the features of the debugger and the DA-C are enhanced. |
VCS Interface And Tool Integration
| All of your existing compiler and make tools can be configured into the DA-C toolbar, the editor macro language supports the error and warning listing reports so you can point and click your way through the compiler error reports and keep the editor window in sync with the current warning or error. Full support is also given to version control systems so that a project can be fully controlled from within the DA-C environment. |
The DA-C editor is a fully configurable programmer's editor with its own C-like macro language. With a minimum of effort you can configure DA-C to work just like your favorite editor; in fact import profiles are available for many of the popular Windows editors, so you can feel right at home straight away. The DA-C has many useful functions that you will not find in other tools. For example in comments, you can change the colour highlight for key words such as `test' or `important' and links to external documents can be embedded in the comments, so with a double click on the keywords in a comment, you can directly start any external program from the editor (e.g. WinWord with a problem description or requirements definition). That will give you a completely new feel for the connection between the source code and the appropriate documentation. Other utilities include a format option which can be used to clean up your code and present it in a uniform layout.
Trying The Development Assistant For Yourself...
If you would like to try the Development Assistant on your own project, you can download the evaluation version from this website!