home *** CD-ROM | disk | FTP | other *** search
/ Programmer's ROM - The Computer Language Library / programmersrom.iso / ada / metric / halstead.me < prev    next >
Encoding:
Text File  |  1988-05-03  |  3.9 KB  |  103 lines

  1.  
  2. NOTE: All the Ada source files are in the file called halstead.src,
  3.       and all the documentation files are in the file called
  4.       halstead.doc.  All the test files are in the file called
  5.       halstead.tst.  These files can be broken apart using the
  6.       WIS JPMO's tool Combine & Break (PD:<ADA.TOOLS>CBREAK*).
  7.  
  8. Note: This version of HALSTEAD ignores the LIBRARY parameter.  The
  9. directory containing the AIE program library must be your default
  10. directory when you run HALSTEAD.  This is a limitation of the AIE
  11. Program Library Manager which should be corrected at some time in the
  12. future.
  13.  
  14. To use the HALSTEAD tool you must:
  15.  
  16.  1. Be a "HIF User".  See the Byron/AIE Programmers Reference Manual
  17.     for details.  This requires that certain logical symbols be defined
  18.     and that you have run the ADD_USER tool to make yourself known to
  19.     the HIF database.
  20.  
  21.  2. Define a symbol HALSTEAD so that VMS knows what executable to run
  22.     when you type the HALSTEAD command.  For example:
  23.  
  24.       $ HALSTEAD :== $USER1:[NOSC.TOOLS]HALSTEAD.EXE
  25.  
  26.      NOTE: The full path name of the executable is required in the 
  27.      definition of the symbol.   The pathname given here is just an
  28.      example and will be different on your system.
  29.  
  30.  3. Create a Byron/AIE program library and use the Byron/AIE compiler
  31.     front end to analyze source code into it.  The AIEPLIB and AIECOMP
  32.     commands are used respectively.
  33.  
  34.  4. Enter a command with appropriate parameters.  For example,
  35.  
  36.       $ HALSTEAD(("MY_PROG", "TEST.OUT"));
  37.  
  38.     Entering the command with no parameters gives a brief description
  39.     of how to use the tool.
  40.  
  41.  
  42. To build the HALSTEAD tool:
  43.  
  44.  1. Compile all the abstractions into a program library (see READ.ME in
  45.     abstractions directory for details).  
  46.  
  47.  2. Compile everything named in the HALSTEAD.CO file into the program library
  48.     containing the abstractions or a sublibrary whose parent library contains 
  49.     all the abstractions.  HALSTEAD.CO lists file names in a correct 
  50.     compilation order.
  51.  
  52.  3. Link HALSTEAD with the program library where everything was compiled.
  53.     To do this using the DEC Ada compiler type:
  54.  
  55.     $ ACS LINK HALSTEAD
  56.  
  57.  
  58. Files contained in the HALSTEAD.SOURCE directory:
  59.  
  60. BLOCK_U.SPC    BLOCK_U.BDY    COMLIN.SPC
  61. COMLIN.BDY    DEFS.SPC    COUNTYPE.SPC    COUNT.SPC
  62. COUNT.BDY    COUNTYPE.BDY    DEFS.BDY    HDB.SPC
  63. HDB.BDY        SCTYPE_SP.SPC    SCNAME_EX.SPC
  64. SCCONSTRA.SPC    IHSUBTYPE.DAT    OBJ.SPC    OBJ.BDY
  65. IHSERIES_.DAT    IHAGG_NAM.DAT    SCCHOICE.SPC
  66. SCAGG_COM.SPC    SCAGG_COM.BDY    IHCASE_AL.DAT
  67. IHHANDLER.DAT    SCSTM.SPC    SCITEM.SPC
  68. SCALTERNA.SPC    SCALTERNA.BDY    IHBLOCK_S.DAT
  69. SRCUTIL.SPC    SCBLOCK_S.SPC    SCBLOCK_S.BDY
  70. IHINNER_R.DAT    SCCHOICE.BDY    SCCOMP_UN.SPC
  71. SCCOMP_UN.BDY    SCGENERAL.SPC    SCCONSTRA.BDY
  72. IHVARIABL.DAT    IHTYPE_DE.DAT    ID_UTILS.SPC
  73. ID_UTILS.BDY    SCDEF_ID.SPC    SCDEF_ID.BDY
  74. SCGENERAL.BDY    IHGENERIC.DAT    SCGENERIC.SPC
  75. SCGENERIC.BDY    SCHEADER.SPC    SCHEADER.BDY
  76. SCVARIANT.SPC    SCINNER_R.SPC    SCINNER_R.BDY
  77. IHTASK_DE.DAT    SCPKG_DEF.SPC    SCOBJECT_.SPC
  78. SCSUBP_DE.SPC    SCITEM.BDY    SCITERATI.SPC
  79. SCITERATI.BDY    SCNAME_EX.BDY    SCOBJECT_.BDY
  80. SCPKG_DEF.BDY    SCSTM.BDY    SCSUBP_DE.BDY
  81. SCTYPE_SP.BDY    SCVARIANT.BDY    SRCUTIL.BDY
  82. HALSTEAD.ADA
  83.  
  84.  
  85. To change the assignemnt of a token as either an operator, operand, or
  86. neither, see COUNT.BDY.  To change the computation of any of the HALSTEAD
  87. measures, see HDB.BDY.  The file HALSTEAD.ADA contains the driver program.  
  88.  
  89.  
  90. To test the HALSTEAD tool, create an AIE program library using AIEPLIB,
  91. compile [.TEST]SCANNERS.SPC and [.TEST]SCANNERS.BDY into the AIE program
  92. library using AIECOMP, make that library your default directory, and run
  93. HALSTEAD, as follows:
  94.  
  95.     $ AIEPLIB [.DEMOLIB]
  96.     $ AIECOMP SCANNERS.SPC [.DEMOLIB]
  97.     $ AIECOMP SCANNERS.BDY [.DEMOLIB]
  98.     $ SET DEFAULT [.DEMOLIB]
  99.     $ HALSTEAD(("SCANNERS"), "SCANNERS.OUT");
  100.  
  101. Then, verify that the file SCANNERS.OUT is the same as that shipped with
  102. this release.
  103.