GNAT Pro Tools

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), GCov 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 and deploying 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, including (and possibly mixed with others)

Day 1 - The GNAT Pro Environment

  • 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 or ASIS

Day 3 - Dynamic Analysis

  • Compiler switches and pragmas
  • Advanced usage of the debugger
  • AUnit and GNATtest – unit testing
  • GCOV – native coverage analysis
  • Ada 2012 for dynamic analysis
  • Advanced exception analysis

Day 4 - CodePeer

  • Run-time error detection
  • Logic error detection
  • Automated code review
  • Test vector and test case generation

Day 5 - Custom tools and quality follow-up

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