Gch - ASIS_GNAT the Ada Rule Checker

Contents

What is Gch

gch (from Gnat CHecker) is a tool that checks Ada sources against a given set of rules. In the current version of gch checks for some rules from the Ada 95 Quality and Style document.

gch is an ASIS-based tool built on top of the ASIS implementation for GNAT (ASIS-for-GNAT). As it is implemented now, gch uses some GNAT-specific features and therefore it is not 100% portable.

gch does not have any platform-specific features and it works with any GNAT porting.

How download and install Gch

gch is distributed in the source form. You can download it as gch.tar.gz (for Unix - 47K, fixed 19.5.99) or  gch.zip (for Windows 95/98/NT - 67K).

When you extract the content of this archive into a directory, you obtain the following directory structure:

To install gch, you have to create unpack of one of these archives (gch.tar.gz or gch.zip) and the executable for its driver subprogram Gch.Driver (files gch-driver.ads, gch-driver.adb).

gch is an ASIS application, so to create this executable, you need ASIS-for-GNAT installed on your machine. The current version of gch has been developed and tested with the public version of the GNAT/ASIS technology 3.11p.

After creating the executable for gch, you may put it and the gch configuration files gch.ini and rules.ini somewhere on your path.

Supposing that ASIS-for-GNAT is installed as an Ada library and that you are in the directory where gch sources are unpacked, to create the executable for gch (named also gch), you should call gnatmake like this:

gnatmake -o gch gch-driver.adb -largs -lasis -lgnat

Under Windows 95/98/NT you can use also the file COMPILE.bat to create the executable for gch, the file CHECK_ALL.bat to check all files of the Tests sub-directory, the file CLEAN.bat to remove all tree and ali files from the sub-directory, and files TEST-*.bat to run some simple tests.

Gnat_Tests

The current version of gch is just a prototype, but already this version is able to process the whole sources of GNAT without blowing-up, and it produces some interesting results for them.

The file named gnat_tests.txt (155K) contains an output of checking all Ada sources from gnat_3.11p-src by the gch (using Gnat_Mode, Delete_Tree_Mode, Hide_Rejected_Files, Show_Global_Statistics, and not Verbose_Mode of diagnostics). It takes 15 min on Pentium II 260 MHz, 64MB.

Additional links and feedback

The gch is also available as package "gch" in Debian GNU/Linux at http://www.debian.org/distrib/packages (thanks to Thomas Quinot).

See ASIS-for-GNAT documentation for more details concerning using the ASIS implementation for GNAT and creating executables for ASIS applications.

See the gch Users' Guide (file gch_ug.txt) included in the gch distribution for more details about how to use gch.

Questions, comments, suggestions: Vitali Sh. Kaufman (Vitali.Kaufman@iname.com).

Copyright and license considerations

gch is copyrighted by its author, Vitali Sh. Kaufman.

gch is distributed under the conditions of the GNU Public License. That is:

- gch is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose;

- gch is distributed with full sources available;

- You can freely copy, modify and redistribute this software, provided that full sources are available for the version being distributed (original or modified), and for a modified version, any changes that you have made are clearly indicated;

- you can not incorporate gch code in any program covered by any license different from the GNU public license;


Last modification 3.9.1999