GNAT Pro Tools

3-5 day course

Through lectures and hands-on workshops, this 5-day course shows how to use AdaCore tools for improving overall code quality as well as for testing and debugging. It presents tools such as GNATcheck (style checks / coding standard compliance), GNATmetric (metric measurements), CodePeer (static analysis / vulnerability detection) or GNATcoverage (structural code coverage analysis) and GNATtest (unit testing). It will also show how to make use of the GNAT compiler options and pragmas in order to detect certain kinds of errors early in the development process, and how to take advantage of stack usage data that can be extracted at compile-time.

Target Audience Ada developers, project managers and quality assurance engineers interested in using static and dynamic analysis tools. Some knowledge of Ada is assumed; no previous experience with the GNAT Pro toolset is required.

Course Duration 3 days minimum covering any three topics listed below 5 days covering all topics listed below

Day 1 - The GNAT Pro Environment

  • (optional) GNATbench for Wind River Workbench or Eclipse
  • GNAT Project Facility
  • Insights and tips on the GNAT toolchain and options

Day 2 - Static Analysis

  • Advanced usage of compiler checks and warnings
  • GNATmetric – metric computation
  • GNATcheck – coding standard compliance verification
  • GNATelim – unused subprogram elimination
  • GNATstack – static stack usage analysis
  • Custom static analysis tools using GPS

Day 3 - Dynamic Analysis

  • Compiler switches and pragmas
  • Advanced usage of the debugger
  • AUnit and GNATtest – unit testing
  • Ada 2012 for dynamic analysis
  • Advanced exception analysis
  • Structural code coverage with GNATcoverage

Day 4 - CodePeer

  • CodePeer overview
  • Using CodePeer
  • Justifying CodePeer messages
  • CodePeer messages and annotations
  • External tools integration
  • CodePeer customization

Day 5 - Custom Tools and Quality Follow-up

  • GNATdashboard
  • Scripting with Python
  • Using GNAT2XML to check rules