GNAT Dynamic Analysis Suite 26 Release Notes¶
We present here a few highlights of the new features in GNAT Dynamic Analysis Suite 26. You can access the complete list in the GNAT DAS 26 feature file.
New ports¶
GNATcoverage now supports coverage analysis for Rust
GNATfuzz now supports native Windows
Code coverage reports¶
Allow consolidation of units with varying SCOs¶
When instrumenting code that may be preprocessed differently according to the configuration, the source-coverage obligations may vary across configurations. GNATcoverage now accepts consolidation of coverage results for units with varying source-coverage obligations, as long as they are not intertwined.
Overriding browser search in GNATcov HTML report¶
As the GNATcoverage HTML report uses virtual scrolling, it does not render the whole source, but only the part that is visible on screen. This made native browser search difficult, as it only worked on the rendered HTML. Searching in the HTML report is now improved by overriding the native search feature to search the whole document.
Add keyboard shortcuts to GNATcov html report¶
Add keyboard shortcuts to navigate between violations in GNATcoverage html report.
Allow generation of a coverage report without traces¶
GNATcoverage now generates a report with only coverage violations and issues a warning when no traces are specified.
GNATcoverage enhancements¶
External annotations for C/C++ coverage analysis¶
GNATcoverage supports coverage annotations in an external file for C and C++.
Function and call coverage for C/C++ in GNATcoverage¶
The function and call coverage level that was introduced in release 25 for the Ada language is extended to the C/C++ languages.
Similarly to Ada, function coverage analysis considers a function covered if its body is entered at least once. Note that for C++, lambda functions are analyzed as well as templated functions, class methods, and overloaded operators. However, class constructors and destructors are ignored.
Call coverage analysis considers a function call covered if it was evaluated at least once. Note that this includes function pointer calls and overloaded operator calls.
This new coverage level can be activated alongside any preexisting coverage level combination, through the use of the “fun_call” option of the “–level” switch.
See section 1.5.8 of the GNAT DAS user manual for more details.
Guarded expression coverage for Ada in GNATcoverage¶
Guarded expression coverage analysis provides insight on the evaluation of sub-expressions nested within conditional expression constructs.
The analysis processes 3 categories of sub expressions nested within conditional constructs, specifically:
for If expressions, each dependent expression (if Cond then <dept_expr> else <dept_expr>);
for Case expressions : each dependent expression (when X => <dept_expr>);
for Quantified expressions : the predicate expression (for all/some I in V => <predicate_expr>)
Guarded expressions coverage analysis is only available for Ada 2022, as it uses Ada2022 features under the hood. Also, the coverage level is only available through source instrumentation.
See section 1.5.9 of the GNAT DAS user manual for more details.
Support in GNATcov for –no-stdlib configuration¶
GNATcoverage now simplifies support for Ada applications which are not linked against the Ada runtime library. The gnatcov setup command now supports a –no-stdlib switch to generate a coverage runtime in which all the units are compatible with the –no-stdlib builder switch. In such situation, the user is responsible for providing a function through which the coverage trace will be emitted at the end of the program execution.
See section “Coverage runtime setup for configurations with no Ada runtime” of the GNAT DAS user manual for more details.
GNATtest enhancements¶
Ada preprocessing directives support¶
GNATtest now supports Ada projects with preprocessing directives by ensuring preprocessing symbols can be passed to GNATtest and invoked through an integrated preprocessor. This enhancement streamlines the workflow for projects using conditional compilation, eliminating the need for manual preprocessing steps before test generation and execution.
Support for libraries defining an interface¶
GNATtest supports generating stubs and test harnesses for library projects which define an interface.
Support for aggregate library projects¶
GNATtest supports generating stubs for project trees containing aggregate libraries.
Support for tagged types test generation¶
GNATtest generates test inputs for tagged types.
Improved support for generics and private types for test generation¶
Test input generation for types declared in the private part of a package, and types declared in an instantiation of a generic package is supported.
Execution of generated testcases on embedded runtimes¶
The testcase decoding runtime is compatible with embedded runtimes.
Improve test runner output in GNATtest¶
GNATtest now accepts a –include-subp-name option to include the name of the subprogram under test in the test_runner output log. The default output is formatted as:
<filename>:<line>:<col>: <message>
whereas adding –include-subp-name on the command line will result in the output looking like:
<filename>:<line>:<col>: (<subp_name>): <message>
Improve –exit-status and –passed-tests switches¶
The output of GNATtest when using –exit-status=on is now more useful when there are failing tests. The tool no longer reports that no test driver exited successfully when using “–exit-status=on” along with “–passed-tests=hide”. The exit status of GNATtest now depends on that of the executed test drivers when running them through “gnattest test_drivers.list”.
Recursive stubbing capabilities in GNATtest¶
GNATtest can now be instructed to recursively stub all units in the import transitive closure of the unit under test, instead of only the direct imports. This behavior can be enabled through the –recursive-stub command line option.
GNATfuzz enhancements¶
Integration of libFuzzer¶
GNATfuzz integrates libFuzzer, a highly efficient, in-process fuzzing engine to its existing suite of fuzzing engines (AFL++, CmpLog, and SymCC).
Automatic execution of all fuzzable Ada subprograms¶
GNATfuzz analyzes an entire Ada project, to identify automatically all subprograms that can serve as fuzzing entry points, and launch the corresponding fuzzing campaigns.
Automatic regression testsuite generation from fuzzing¶
During fuzzing campaigns, GNATfuzz stores specific tests that trigger new paths and conditions, and provides these tests as a corpus for automatic regression testing. These tests can also seed future GNATfuzz fuzzing campaigns.