Utilities for Analysis, Testing and Code Navigation

Extensive navigation and analysis tools can generate a variety of useful information including call graphs, source dependencies, project organization, and complexity metrics, giving you a thorough understanding of your program at multiple levels.

Unused Subprogram Eliminator (gnatelim) 

The gnatelim tool reduces the size of executables by preventing the inclusion of object code for subprograms that are never called. Such subprograms are common in some object-oriented designs and large math libraries, for example, and the presence of uncalled subprograms complicates certification with respect to standards such as DO-178C. 

Program Metrics Generator (gnatmetric) 

The gnatmetric tool analyzes the source code to calculate a set of commonly used industry metrics that allow you to estimate the size and better understand the structure of your application. This information also helps satisfy the requirements of certain software development frameworks, for example ensuring that the static nesting level is below some threshold.

Heap Usage Monitor (gnatmem) 

The gnatmem utility monitors dynamic allocation and deallocation activity in an executing program and displays information about incorrect deallocations and possible sources of memory leaks.

Unit Testing Framework (aunit)

AUnit is a unit test framework based on CppUnit for C++. It facilitates test-driven development for both native and embedded software. GPS can generate the boilerplate code for test harnesses, suites and test cases needed to use the framework. For more information on AUnit, please view a series of tutorials.

Pretty Printer (gnatpp)

The gnatpp tool is a utility for source reformatting, i.e. “pretty-printing”. The tool takes an Ada source file as input and generates a reformatted version as output. Reformatting is controlled by an extensive set of switches, e.g. identifier case conventions, rules of indentation, and comment layout.

Program Browser (gnatfind, gnatxref)

The two tools gnatxref and gnatfind use information generated by the compiler so that you can locate the declaration and references to any given entity. The gnatfind tool is intended for interactively locating definitions and/or references to a specified entity or entities, whereas gnatxref generates a full report of all cross-references.

Documentation Generator (gnathtml)

GPS provides a documentation generator gnathtml which processes Ada source files and generates annotated HTML files. The tool uses a set of user-extensible template files to control the final rendering.

Preprocessor (gnatprep)

The gnatprep utility provides a simple preprocessing capability for Ada source code. It is designed for use with GNAT, but is not dependent on any special features of GNAT.