README.TXT 24/01/97 AdaSAP - Ada'95 Static Analysis Program [AdaSAP v.0.7g, alpha release] ------------------------------------------------------------------------------- FILES ON THE DISK: Adasap.exe executable program file Go32.exe Ada'95 run-time file Output.file example of output to screen from program test runs Output.screen example of .sas & .sab files from program test runs ReadMe.txt this file Specsv07.zip archive of SA_Class .ads files and Client file (zipped with WinZip) ------------------------------------------------------------------------------- SYNTAX: adasap filename | ADASAP FILENAME ------------------------------------------------------------------------------- USER NOTES: "filename" must be in DOS 8-character format, WITHOUT extension. Either one or both of the .ADS and .ADB files will be analysed, as appropriate. \path\... cannot be included in "filename", AdaSAP.exe must be in the same directory as the source code to be analysed. If "filename" does not exist an error message will be displayed. AdaSAP v0.7g does NOT run under Windows (either 3.x or 95), the computer must be in DOS mode. This is a gnat compiler problem that will (hopefully) be overcome when the program is compiled on a newer version. The Ada'95 run-time file "Go32.exe" must be present in the current directory or in a directory defined in your computer's PATH statement. (note: AdaSAP has not been tested on a 16-bit machine). There is no help file but appropriate Error Messages will be generated as necessary. AdaSAP will create either one or both of the output files, as appropriate: FILENAME.SAB for .ADB files FILENAME.SAS for .ADS files each containing a detailed analysis of the corresponding source code. In version 0.7 this includes: 1. BASIC COUNTS: Line Count Byte Count 2. ANALYSIS OF SOURCE LINES: Lines of Source Code Lines of Comments (+ In-Line Comments) Blank Lines Density of Comments (as %) 3. *PROGRAM COMPLEXITY ANALYSIS (Cyclomatic Complexity): counts of: 'case' blocks 'exception' blocks 'if' branches 'elsif' branches 'when' branches 'loop' iterations Total CC [if+elsif+when+loop-case+1] Average CC per subprogram 5. PACKAGES (Named & Counted): 'with'ed Packages 'use'd Packages Instantiated Packages 6. ~SUBPROGRAMS (Named & Counted): Procedures Functions * Section 3 does not apply to .ADS files ~ includes naming/counting of PRIVATE subprograms in .ADS files ------------------------------------------------------------------------------- DESIGN NOTES: AdaSAP is constructed using the following class hierarchy: [SA]-[SA_Set1]-[SA_Set2]-[SA_Set3]-[SA_Set4]- [SA_Loc]-[SA_Cloc]-[SA_Doc]-[SA_Cyclo]-[SA_With]-[SA_Pack]-[SA_Use]- [SA_SubP]-[SA_Final] where SA...SA_Set4 are concerned with preparing the source code file and SA_Loc...SA_SubP perform the actual analyses. client file = [Client7g] The packages TGM_Tools, Put_Asa (both programmer-defined) and [ADA.] TEXT_IO, COMMAND_LINE & STRINGS_UNBOUNDED are also required for compilation. Version 0.7g = SA_class version 0.7, client_id version 'g'. AdaSAP is a work-in-progress. Additional functionality will be added in future versions, (hopefully) to include: counting & naming of data objects counting of usage of data objects cyclomatic complexity for individual subprograms depth of nesting any other ideas...? All .ADS source code files are available on request. Comments, criticisms, bug-reports, etc. are welcome. ------------------------------------------------------------------------------- [AdaSAP v0.7g] author: Tobias Mayer, 1996/97 email: mayert@sbu.ac.uk