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.

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. GNAT Studio 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)

GNAT Studio 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.