NtropiX_medium.jpg

 

Software For Algorithmic Trading Of Equities:

Quality Assurance, (QA)


Home | Installation | Usage | FAQs | Utilities | Architecture | QA | Tests | Links | Mailing List | License | Author | Download | Thanks



home.jpg
installation.jpg
usage.jpg
FAQs.jpg
utilities.jpg
architecture.jpg
QA.jpg
tests.jpg
links.jpg
mailinglist.jpg
license.jpg
author.jpg
download.jpg
thanks.jpg

Attached is the quality assurance process for the tsinvest program suite, (ie., the tsinvest(1), tsinvestsim(1), tsshannoneffective(1), tsinvestdb(1), and csv2tsinvest(1) programs.) The programs have a substantial regression test suite (see the tests directory in the source tree, or the Tests page that describes how every line of code is exercised in the programs, and all available command line options.) The regression test suite exercises the programs in an envelope of corner solutions taken from market data, and fabricated using theoretical values where the program's results can be compared against theoretical expectations. The results compare favorably with the theoretical values.

The regression suite also contains a fragment of the US equity market exchange tickers, which is used to exercise the tsinvest program, and the internal data structures dumped to a file. This file is then used by the tsinvestsim program to provide theoretically derived data to the tsinvest program, and the two results compared to gain confidence in the stochastic methods used. The two results compare favorably, as table I and III show on the Usage page.

In addition, the tsshannoneffective program is a test facility that exercises certain complex functionality of the tsinvest program.

Additionally, various static verifications were performed. A description, and the results, are attached for each program.

As a support metric for the program suite, the collateral documentation for the program(s) is ninety six lines of collateral per one line of executable code.

The process described is not comprehensive. However, it is probably minimally adequate for a useful and maintainable program. By no means can it be regarded as qualifying the program for mission critical applications.

John Conover
john@email.johncon.com
January 6, 2006

The following is the McCabe and Halstead metrics for the program, tsinvest, as generated by "CodeCheck" from Abraxas Software, Inc., 7033 SW Macadam Ave., Portland, OR 97219, USA, telephone (503) 244-5253.

The program has only 908 lines of executable code, and 325 lines of declarations, out of 8402 total lines, of which, 4043 lines are comments, (the rest are whitespace, punctuation, compiler directives, etc.) Over 99% of the lines of executable code is commented.

The diagnostics from CodeCheck seem within reasonable bounds, (no errors or warnings were permitted, excepting as noted in tsinvest.c concerning line length of comments, size of functions, etc.) The lint product from Gimpel Software, 3207 Hogarth Lane, Collegeville, PA, 19426, USA, telephone (215) 584-4261, was used to verify the code statics, (no errors or warnings were permitted,) in addition to the lint on the ATT SysV, Rel. 4.2 system that was used for development, (again, no errors or warnings were permitted.) The GNU compiler, GCC, was used for cross development, with all warnings enabled. No errors or warnings were permitted. Memory allocation robustness, (memory boundary overruns and referencing of un-allocated areas,) was verified using Bruce Perens' "efence" library, c/o Pixar, 1001 West Cutting Blvd., Suite 200, Richmond, CA 94804, telephone (510) 215-3502, Bruce@Pixar.com. The sources were formated for consistency with the indent program, available via anonymous ftp from ftp://prep.ai.mit.edu/pub/gnu/ in /pub/gnu/indent.1.9.1.tar.gz.

John Conover
john@email.johncon.com
January 6, 2006


  Date: Nov 07 1999, 17:04:46.
  Note: Line counts do NOT include lines from header files.

  tsinvest

      main

          sqrt                 function
          tsgetopt             function
          atof                 function
          atoi                 function
          atof                 function
          atoi                 function
          atoi                 function
          atof                 function
          printf               function
          printf               function
          hash_init            function
          fopen                function
          fgets                function
          strtoken             function
          atof                 function
          strcpy               function
          get_stock            function
          strcmp               function
          update_stocks        function
          invest               function
          printstocks          function
          strcpy               function
          update_stocks        function
          invest               function
          printstocks          function
          fclose               function
          printf               function
          hash_term            function
          fprintf              function
          exit                 function

          Complexity, 49  (very high)
          Density, 1.232258

          length, 878.613525
          volume, 7321.780273
          % abstraction, 0.158563

      invest

          POPINVESTMENT        macro
          qsortlist            function
          invest_decisions     function
          PUSHPRINT            macro

          Complexity, 4  (low)
          Density, 1.894737

          length, 167.297318
          volume, 808.666565
          % abstraction, 2.237602

      invest_decisions

          sqrt                 function
          sqrt                 function
          GAIN                 macro
          PUSHINVESTMENT       macro
          sqrt                 function
          sqrt                 function
          GAIN                 macro
          PUSHINVESTMENT       macro
          sqrt                 function
          GAIN                 macro
          PUSHINVESTMENT       macro
          sqrt                 function
          sqrt                 function
          GAIN                 macro
          PUSHINVESTMENT       macro
          sqrt                 function
          sqrt                 function
          GAIN                 macro
          PUSHINVESTMENT       macro
          PUSHINVESTMENT       macro
          sqrt                 function
          sqrt                 function
          GAIN                 macro
          PUSHINVESTMENT       macro

          Complexity, 40  (very high)
          Density, 1.653333

          length, 336.516418
          volume, 6673.011230
          % abstraction, 0.378633

      printstocks

          printf               function
          printf               function
          printf               function
          printf               function
          printf               function
          printf               function

          Complexity, 6  (low)
          Density, 1.692308

          length, 140.344376
          volume, 656.282715
          % abstraction, 5.028321

      get_stock

          hash_find            function
          hash_insert          function
          hash_find            function

          Complexity, 4  (low)
          Density, 2.071429

          length, 134.013596
          volume, 665.859985
          % abstraction, 10.229521

      update_stocks

          statistics           function
          decisions            function

          Complexity, 6  (low)
          Density, 2.727273

          length, 202.277756
          volume, 1197.223999
          % abstraction, 0.397159

      statistics

          sqrt                 function
          normal               function
          sqrt                 function
          confidenceavgrms     function
          confidenceavg        function
          confidencerms        function
          GAIN                 macro
          pow                  function
          normal               function
          sqrt                 function
          normal               function
          normal               function
          sqrt                 function
          normal               function
          realloc              function
          pow                  function
          pow                  function
          realloc              function
          pow                  function
          pow                  function

          Complexity, 35  (very high)
          Density, 2.849673

          length, 498.939728
          volume, 10341.522461
          % abstraction, 0.045979

      decisions

          GAIN                 macro
          GAIN                 macro
          sqrt                 function
          GAIN                 macro
          GAIN                 macro
          GAIN                 macro
          GAIN                 macro
          GAIN                 macro
          rand                 function
          GAIN                 macro

          Complexity, 23  (high)
          Density, 2.047619

          length, 304.238190
          volume, 3208.529053
          % abstraction, 0.148195

      cumulativenormal

          sqrt                 function
          exp                  function

          Complexity, 2  (low)
          Density, 3.666667

          length, 144.545532
          volume, 610.384644
          % abstraction, 0.327662

      confidencerms

          cumulativenormal     function
          sqrt                 function
          MIDWAY               macro

          Complexity, 4  (low)
          Density, 2.318182

          length, 209.092590
          volume, 1088.141724
          % abstraction, 0.436973

      confidenceavg

          cumulativenormal     function
          sqrt                 function
          sqrt                 function
          floor                function
          MIDWAY               macro
          sqrt                 function
          sqrt                 function

          Complexity, 7  (low)
          Density, 2.500000

          length, 246.438568
          volume, 1710.131958
          % abstraction, 0.278042

      confidenceavgrms

          cumulativenormal     function
          sqrt                 function
          MIDWAY               macro
          sqrt                 function
          MIDWAY               macro

          Complexity, 7  (low)
          Density, 2.538461

          length, 247.175629
          volume, 2166.167236
          % abstraction, 0.219507

      normal

          cumulativenormal     function
          floor                function

          Complexity, 3  (low)
          Density, 1.666667

          length, 76.238831
          volume, 258.647034
          % abstraction, 1.838369

      strtoken

          strcpy               function
          strtok               function
          strtok               function

          Complexity, 2  (low)
          Density, 2.166667

          length, 77.302971
          volume, 272.025330
          % abstraction, 9.288177

      hash_init

          malloc               function

          Complexity, 4  (low)
          Density, 2.700000

          length, 133.662018
          volume, 554.883362
          % abstraction, 0.856917

      hash_insert

          comphash             function
          cmphash              function
          mkhash               function
          SWAP                 macro
          SWAP                 macro

          Complexity, 5  (low)
          Density, 1.933333

          length, 156.238663
          volume, 791.836914
          % abstraction, 1.466166

      hash_find

          comphash             function
          cmphash              function

          Complexity, 3  (low)
          Density, 2.100000

          length, 128.090225
          volume, 485.000000
          % abstraction, 2.393740

      hash_term

          SWAP                 macro
          SWAP                 macro
          rmhash               function
          free                 function

          Complexity, 3  (low)
          Density, 2.000000

          length, 150.117310
          volume, 548.012085
          % abstraction, 0.867661

      hash_text


          Complexity, 4  (low)
          Density, 4.857143

          length, 143.258377
          volume, 691.894958
          % abstraction, 1.677948

      text_cmphash

          strcmp               function

          Complexity, 1  (low)
          Density, 3.000000

          length, 36.529327
          volume, 70.308357
          % abstraction, 16.512461

      text_mkhash

          malloc               function
          strlen               function
          malloc               function
          strcpy               function
          PUSHDECISION         macro
          free                 function

          Complexity, 3  (low)
          Density, 2.644068

          length, 485.488190
          volume, 3313.655029
          % abstraction, 0.143494

      text_rmhash

          free                 function
          free                 function
          free                 function
          free                 function

          Complexity, 3  (low)
          Density, 2.166667

          length, 52.870766
          volume, 224.810455
          % abstraction, 2.115065

      qsortlist

          element_comp         macro
          qsortlist            function
          qsortlist            function

          Complexity, 5  (low)
          Density, 1.904762

          length, 117.592590
          volume, 775.288696
          % abstraction, 1.497460

      tsgetopt

          strcmp               function
          strchr               function
          fprintf              function
          fprintf              function

          Complexity, 12  (moderate)
          Density, 2.166667

          length, 202.277756
          volume, 1669.523438
          % abstraction, 1.083827

  File tsinvest has:
      Manifest constants: 13
      Executable lines: 908
      Comment lines with text: 4043
      Declaration lines: 325
      Whitespace lines: 2318
      Preprocessor lines: 161
      Suppressed lines: 181
      Punctuation lines: 524
      TOTAL LINES: 8460

      Low-level statements: 633
      Non-executable statements: 49
      High-level statements: 366
      TOTAL STATEMENTS: 1048

      Macros defined: 211
      Functions defined: 24

      Executable lines per function (1):
          Mean: 108.000000
          Minimum: 19.000000
          Std.Dev: 62.965599
          Maximum: 155.000000

      Executable lines per function (2):
          Mean: 26.142857
          Minimum: 1.000000
          Std.Dev: 32.740372
          Maximum: 153.000000

      Function Density (operators per executable line) (1):
          Mean: 1.593443
          Std.Dev: 0.273751

      Function Density (operators per executable line) (2):
          Mean: 2.462742
          Std.Dev: 0.709164

      Function Complexity (McCabe) (1):
          Mean: 31.000000
          Std.Dev: 19.442223
          Maximum: 49.000000

      Function Complexity (McCabe) (2):
          Mean: 6.761905
          Std.Dev: 7.794410
          Maximum: 35.000000

      Histogram (1):

      0 +
      1 +
      2 +
      3 +
      4 + x
      5 +
      6 +
      7 +
      8 +
      9 +
     10 +
     11 +
     12 +
     13 +
     14 +
     15 +
     16 +
     17 +
     18 +
     19 +
     20 +
  [2 cases were above 20]

      Histogram (2):

      0 +
      1 + x
      2 + xx
      3 + xxxxx
      4 + xxxx
      5 + xx
      6 + xx
      7 + xx
      8 +
      9 +
     10 +
     11 +
     12 + x
     13 +
     14 +
     15 +
     16 +
     17 +
     18 +
     19 +
     20 +
  [2 cases were above 20]

      Level of Function Abstraction (percent) (1)

      Histogram:

          0 + tsinvest
          5 +
         10 +
         15 +
         20 +
         25 +
         30 +
         35 +
         40 +
         45 +
         50 +

      Level of Function Abstraction (percent) (2)

      Histogram:

          0 + xxxxxxxxxxxxxxxxx
          5 + xx
         10 + x
         15 + x
         20 +
         25 +
         30 +
         35 +
         40 +
         45 +
         50 +

      Halstead Volume (1): 24634.103516
      Halstead Length (1): 2023.955200
      Halstead Purity (1): 0.663157
      Halstead Effort (1): 1840848.875000

      Halstead Volume (2): 52541.007813
      Halstead Length (2): 2290.774902
      Halstead Purity (2): 0.358774
      Halstead Effort (2): 9626044.000000

      2318 whitespace lines
      908 executable lines
      8462 source-file lines

        

The following is the McCabe and Halstead metrics for the program, tsinvestsim, as generated by "CodeCheck" from Abraxas Software, Inc., 7033 SW Macadam Ave., Portland, OR 97219, USA, telephone (503) 244-5253.

The program has only 195 lines of executable code, and 43 lines of declarations, out of 1262 total lines, of which, 406 lines are comments, (the rest are whitespace, punctuation, compiler directives, etc.) Over 99% of the lines of executable code is commented.

The diagnostics from CodeCheck seem within reasonable bounds, (no errors or warnings were permitted, excepting as noted in tsinvestsim.c concerning line length of comments, size of functions, etc.) The lint product from Gimpel Software, 3207 Hogarth Lane, Collegeville, PA, 19426, USA, telephone (215) 584-4261, was used to verify the code statics, (no errors or warnings were permitted,) in addition to the lint on the ATT SysV, Rel. 4.2 system that was used for development, (again, no errors or warnings were permitted.) The GNU compiler, GCC, was used for cross development, with all warnings enabled. No errors or warnings were permitted. Memory allocation robustness, (memory boundary overruns and referencing of un-allocated areas,) was verified using Bruce Perens' "efence" library, c/o Pixar, 1001 West Cutting Blvd., Suite 200, Richmond, CA 94804, telephone (510) 215-3502, Bruce@Pixar.com. The sources were formated for consistency with the indent program, available via anonymous ftp from ftp://prep.ai.mit.edu/pub/gnu/ in /pub/gnu/indent.1.9.1.tar.gz.

John Conover
john@email.johncon.com
January 6, 2006


  Date: Nov 07 1999, 17:14:36.
  Note: Line counts do NOT include lines from header files.

  tsinvestsim

      main

          sqrt                 function
          tsgetopt             function
          atoi                 function
          sqrt                 function
          printf               function
          printf               function
          read_infile          function
          atoi                 function
          floor                function
          rand                 function
          printf               function
          POP                  macro
          free                 function
          free                 function
          fprintf              function
          exit                 function

          Complexity, 14  (moderate)
          Density, 2.043478

          length, 428.013885
          volume, 2716.929443
          % abstraction, 0.427307

      read_infile

          cumulative_normal    function
          fopen                function
          fgets                function
          strtoken             function
          malloc               function
          PUSH                 macro
          toupper              function
          strcmp               function
          atof                 function
          strcmp               function
          atof                 function
          findHvalue           function
          sqrt                 function
          strcmp               function
          atof                 function
          strcmp               function
          atof                 function
          malloc               function
          strlen               function
          strcpy               function
          sprintf              function
          malloc               function
          strlen               function
          strcpy               function
          fclose               function
          cumulative_normal    function

          Complexity, 28  (high)
          Density, 2.694444

          length, 523.775330
          volume, 5270.562012
          % abstraction, 0.220273

      strtoken

          strcpy               function
          strtok               function
          strtok               function

          Complexity, 2  (low)
          Density, 2.166667

          length, 77.302971
          volume, 272.025330
          % abstraction, 9.288177

      cumulative_normal

          sqrt                 function
          malloc               function
          exp                  function
          free                 function

          Complexity, 4  (low)
          Density, 3.000000

          length, 214.203903
          volume, 1094.254028
          % abstraction, 0.182773

      findHvalue

          MIDWAY               macro

          Complexity, 5  (low)
          Density, 2.142857

          length, 134.013596
          volume, 620.460449
          % abstraction, 0.766348

      tsgetopt

          strcmp               function
          strchr               function
          fprintf              function
          fprintf              function

          Complexity, 12  (moderate)
          Density, 2.166667

          length, 202.277756
          volume, 1669.523438
          % abstraction, 1.083827

  File tsinvestsim has:
      Manifest constants: 10
      Executable lines: 195
      Comment lines with text: 406
      Declaration lines: 43
      Whitespace lines: 390
      Preprocessor lines: 51
      Suppressed lines: 25
      Punctuation lines: 152
      TOTAL LINES: 1262

      Low-level statements: 111
      Non-executable statements: 16
      High-level statements: 116
      TOTAL STATEMENTS: 243

      Macros defined: 233
      Functions defined: 6

      Executable lines per function:
          Mean: 30.833334
          Minimum: 6.000000
          Std.Dev: 22.423326
          Maximum: 72.000000

      Function Density (operators per executable line):
          Mean: 2.369019
          Std.Dev: 0.351913

      Function Complexity (McCabe):
          Mean: 10.833333
          Std.Dev: 8.801830
          Maximum: 28.000000

      Histogram:

      0 +
      1 +
      2 + x
      3 +
      4 + x
      5 + x
      6 +
      7 +
      8 +
      9 +
     10 +
     11 +
     12 + x
     13 +
     14 + x
     15 +
     16 +
     17 +
     18 +
     19 +
     20 +
  [1 case was above 20]

      Level of Function Abstraction (percent)

      Histogram:

          0 + xxxxx
          5 + x
         10 +
         15 +
         20 +
         25 +
         30 +
         35 +
         40 +
         45 +
         50 +

      Halstead Volume: 16521.371094
      Halstead Length: 1197.520874
      Halstead Purity: 0.541865
      Halstead Effort: 1515717.875000

      390 whitespace lines
      195 executable lines
      1262 source-file lines

        

The following is the McCabe and Halstead metrics for the program, tsshannoneffective, as generated by "CodeCheck" from Abraxas Software, Inc., 7033 SW Macadam Ave., Portland, OR 97219, USA, telephone (503) 244-5253.

The program has only 202 lines of executable code, and 51 lines of declarations, out of 2517 total lines, of which, 1370 lines are comments, (the rest are whitespace, punctuation, compiler directives, etc.) Over 99% of the lines of executable code is commented.

The diagnostics from CodeCheck seem within reasonable bounds, (no errors or warnings were permitted, excepting as noted in tsshannoneffective.c concerning line length of comments, size of functions, etc.) The lint product from Gimpel Software, 3207 Hogarth Lane, Collegeville, PA, 19426, USA, telephone (215) 584-4261, was used to verify the code statics, (no errors or warnings were permitted,) in addition to the lint on the ATT SysV, Rel. 4.2 system that was used for development, (again, no errors or warnings were permitted.) The GNU compiler, GCC, was used for cross development, with all warnings enabled. No errors or warnings were permitted. Memory allocation robustness, (memory boundary overruns and referencing of un-allocated areas,) was verified using Bruce Perens' "efence" library, c/o Pixar, 1001 West Cutting Blvd., Suite 200, Richmond, CA 94804, telephone (510) 215-3502, Bruce@Pixar.com. The sources were formated for consistency with the indent program, available via anonymous ftp from ftp://prep.ai.mit.edu/pub/gnu/ in /pub/gnu/indent.1.9.1.tar.gz.

John Conover
john@email.johncon.com
January 6, 2006


  Date: Nov 07 1999, 16:56:30.
  Note: Line counts do NOT include lines from header files.

  tsshannoneffective

      main

          tsgetopt             function
          printf               function
          printf               function
          atof                 function
          atof                 function
          atoi                 function
          confidenceavg        function
          printf               function
          confidencerms        function
          printf               function
          confidenceavgrms     function
          printf               function
          normal               function
          sqrt                 function
          sqrt                 function
          confidenceavg        function
          printf               function
          confidencerms        function
          printf               function
          confidenceavgrms     function
          printf               function
          atoi                 function
          normal               function
          sqrt                 function
          sqrt                 function
          printf               function
          fprintf              function
          exit                 function

          Complexity, 12  (moderate)
          Density, 2.428571

          length, 424.713379
          volume, 3463.256592
          % abstraction, 0.335223

      cumulativenormal

          sqrt                 function
          exp                  function

          Complexity, 2  (low)
          Density, 3.666667

          length, 144.545532
          volume, 610.384644
          % abstraction, 0.327662

      confidencerms

          cumulativenormal     function
          sqrt                 function
          MIDWAY               macro

          Complexity, 4  (low)
          Density, 2.318182

          length, 209.092590
          volume, 1088.141724
          % abstraction, 0.436973

      confidenceavg

          cumulativenormal     function
          sqrt                 function
          sqrt                 function
          floor                function
          MIDWAY               macro
          sqrt                 function
          sqrt                 function

          Complexity, 7  (low)
          Density, 2.500000

          length, 246.438568
          volume, 1710.131958
          % abstraction, 0.278042

      confidenceavgrms

          cumulativenormal     function
          sqrt                 function
          MIDWAY               macro
          sqrt                 function
          MIDWAY               macro

          Complexity, 7  (low)
          Density, 2.538461

          length, 247.175629
          volume, 2166.167236
          % abstraction, 0.219507

      normal

          cumulativenormal     function
          floor                function

          Complexity, 3  (low)
          Density, 1.666667

          length, 76.238831
          volume, 258.647034
          % abstraction, 1.838369

      tsgetopt

          strcmp               function
          strchr               function
          fprintf              function
          fprintf              function

          Complexity, 12  (moderate)
          Density, 2.166667

          length, 202.277756
          volume, 1669.523438
          % abstraction, 1.083827

  File tsshannoneffective has:
      Manifest constants: 5
      Executable lines: 202
      Comment lines with text: 1370
      Declaration lines: 51
      Whitespace lines: 706
      Preprocessor lines: 44
      Suppressed lines: 24
      Punctuation lines: 120
      TOTAL LINES: 2517

      Low-level statements: 125
      Non-executable statements: 15
      High-level statements: 81
      TOTAL STATEMENTS: 221

      Macros defined: 176
      Functions defined: 7

      Executable lines per function:
          Mean: 27.714285
          Minimum: 6.000000
          Std.Dev: 16.059837
          Maximum: 56.000000

      Function Density (operators per executable line):
          Mean: 2.469316
          Std.Dev: 0.560576

      Function Complexity (McCabe):
          Mean: 6.714286
          Std.Dev: 3.768830
          Maximum: 12.000000

      Histogram:

      0 +
      1 +
      2 + x
      3 + x
      4 + x
      5 +
      6 +
      7 + xx
      8 +
      9 +
     10 +
     11 +
     12 + xx
     13 +
     14 +
     15 +
     16 +
     17 +
     18 +
     19 +
     20 +

      Level of Function Abstraction (percent)

      Histogram:

          0 + xxxxxxx
          5 +
         10 +
         15 +
         20 +
         25 +
         30 +
         35 +
         40 +
         45 +
         50 +

      Halstead Volume: 15364.805664
      Halstead Length: 905.949585
      Halstead Purity: 0.421568
      Halstead Effort: 1544302.750000

      706 whitespace lines
      202 executable lines
      2517 source-file lines

        

The following is the McCabe and Halstead metrics for the program, tsinvestdb, as generated by "CodeCheck" from Abraxas Software, Inc., 7033 SW Macadam Ave., Portland, OR 97219, USA, telephone (503) 244-5253.

The program has only 199 lines of executable code, and 75 lines of declarations, out of 1989 total lines, of which, 682 lines are comments, (the rest are whitespace, punctuation, compiler directives, etc.) Over 99% of the lines of executable code is commented.

The diagnostics from CodeCheck seem within reasonable bounds, (no errors or warnings were permitted, excepting as noted in tsinvestdb.c concerning line length of comments, size of functions, etc.) The lint product from Gimpel Software, 3207 Hogarth Lane, Collegeville, PA, 19426, USA, telephone (215) 584-4261, was used to verify the code statics, (no errors or warnings were permitted,) in addition to the lint on the ATT SysV, Rel. 4.2 system that was used for development, (again, no errors or warnings were permitted.) The GNU compiler, GCC, was used for cross development, with all warnings enabled. No errors or warnings were permitted. Memory allocation robustness, (memory boundary overruns and referencing of un-allocated areas,) was verified using Bruce Perens' "efence" library, c/o Pixar, 1001 West Cutting Blvd., Suite 200, Richmond, CA 94804, telephone (510) 215-3502, Bruce@Pixar.com. The sources were formated for consistency with the indent program, available via anonymous ftp from ftp://prep.ai.mit.edu/pub/gnu/ in /pub/gnu/indent.1.9.1.tar.gz.

John Conover
john@email.johncon.com
January 6, 2006


  Date: Nov 07 1999, 16:40:25.
  Note: Line counts do NOT include lines from header files.

  tsinvestdb

      main

          tsgetopt             function
          printf               function
          printf               function
          hash_init            function
          fopen                function
          fgets                function
          strtoken             function
          atof                 function
          strcpy               function
          get_stock            function
          strcmp               function
          update_stocks        function
          strcpy               function
          printf               function
          fprintf              function
          fprintf              function
          fprintf              function
          printf               function
          update_stocks        function
          fclose               function
          hash_term            function
          fprintf              function
          exit                 function

          Complexity, 22  (high)
          Density, 1.645161

          length, 485.256592
          volume, 3601.605469
          % abstraction, 0.322346

      get_stock

          hash_find            function
          hash_insert          function
          hash_find            function

          Complexity, 4  (low)
          Density, 2.142857

          length, 76.635040
          volume, 401.348846
          % abstraction, 2.892656

      update_stocks


          Complexity, 3  (low)
          Density, 1.777778

          length, 81.832298
          volume, 321.172913
          % abstraction, 1.480476

      strtoken

          strcpy               function
          strtok               function
          strtok               function

          Complexity, 2  (low)
          Density, 2.166667

          length, 77.302971
          volume, 272.025330
          % abstraction, 9.288177

      hash_init

          malloc               function

          Complexity, 4  (low)
          Density, 2.700000

          length, 133.662018
          volume, 554.883362
          % abstraction, 0.856917

      hash_insert

          comphash             function
          cmphash              function
          mkhash               function
          SWAP                 macro
          SWAP                 macro

          Complexity, 5  (low)
          Density, 1.933333

          length, 156.238663
          volume, 791.836914
          % abstraction, 1.466166

      hash_find

          comphash             function
          cmphash              function

          Complexity, 3  (low)
          Density, 2.100000

          length, 128.090225
          volume, 485.000000
          % abstraction, 2.393740

      hash_term

          SWAP                 macro
          SWAP                 macro
          rmhash               function
          free                 function

          Complexity, 3  (low)
          Density, 2.000000

          length, 150.117310
          volume, 548.012085
          % abstraction, 0.867661

      hash_text


          Complexity, 4  (low)
          Density, 4.857143

          length, 143.258377
          volume, 691.894958
          % abstraction, 1.677948

      text_cmphash

          strcmp               function

          Complexity, 1  (low)
          Density, 3.000000

          length, 36.529327
          volume, 70.308357
          % abstraction, 16.512461

      text_mkhash

          malloc               function
          strlen               function
          malloc               function
          strcpy               function
          PUSHDECISION         macro
          free                 function

          Complexity, 3  (low)
          Density, 2.450000

          length, 186.211441
          volume, 1046.109497
          % abstraction, 0.454531

      text_rmhash

          free                 function
          free                 function

          Complexity, 1  (low)
          Density, 1.500000

          length, 16.364529
          volume, 39.000000
          % abstraction, 12.192019

      tsgetopt

          strcmp               function
          strchr               function
          fprintf              function
          fprintf              function

          Complexity, 12  (moderate)
          Density, 2.166667

          length, 202.277756
          volume, 1669.523438
          % abstraction, 1.083827

  File tsinvestdb has:
      Manifest constants: 10
      Executable lines: 199
      Comment lines with text: 682
      Declaration lines: 75
      Whitespace lines: 694
      Preprocessor lines: 71
      Suppressed lines: 95
      Punctuation lines: 173
      TOTAL LINES: 1989

      Low-level statements: 136
      Non-executable statements: 24
      High-level statements: 110
      TOTAL STATEMENTS: 270

      Macros defined: 104
      Functions defined: 13

      Executable lines per function:
          Mean: 14.615385
          Minimum: 1.000000
          Std.Dev: 15.524365
          Maximum: 62.000000

      Function Density (operators per executable line):
          Mean: 2.341508
          Std.Dev: 0.825335

      Function Complexity (McCabe):
          Mean: 5.153846
          Std.Dev: 5.530978
          Maximum: 22.000000

      Histogram:

      0 +
      1 + xx
      2 + x
      3 + xxxx
      4 + xxx
      5 + x
      6 +
      7 +
      8 +
      9 +
     10 +
     11 +
     12 + x
     13 +
     14 +
     15 +
     16 +
     17 +
     18 +
     19 +
     20 +
  [1 case was above 20]

      Level of Function Abstraction (percent)

      Histogram:

          0 + xxxxxxxxxx
          5 + x
         10 + x
         15 + x
         20 +
         25 +
         30 +
         35 +
         40 +
         45 +
         50 +

      Halstead Volume: 18580.429688
      Halstead Length: 1288.533203
      Halstead Purity: 0.524434
      Halstead Effort: 1977755.750000

      694 whitespace lines
      199 executable lines
      1989 source-file lines

        

The following is the McCabe and Halstead metrics for the program, csv2tsinvest, as generated by "CodeCheck" from Abraxas Software, Inc., 7033 SW Macadam Ave., Portland, OR 97219, USA, telephone (503) 244-5253.

The program has only 129 lines of executable code, and 24 lines of declarations, out of 835 total lines, of which, 282 lines are comments, (the rest are whitespace, punctuation, compiler directives, etc.) Over 99% of the lines of executable code is commented.

The diagnostics from CodeCheck seem within reasonable bounds, (no errors or warnings were permitted, excepting as noted in csv2tsinvest.c concerning line length of comments, size of functions, etc.) The lint product from Gimpel Software, 3207 Hogarth Lane, Collegeville, PA, 19426, USA, telephone (215) 584-4261, was used to verify the code statics, (no errors or warnings were permitted,) in addition to the lint on the ATT SysV, Rel. 4.2 system that was used for development, (again, no errors or warnings were permitted.) The GNU compiler, GCC, was used for cross development, with all warnings enabled. No errors or warnings were permitted. Memory allocation robustness, (memory boundary overruns and referencing of un-allocated areas,) was verified using Bruce Perens' "efence" library, c/o Pixar, 1001 West Cutting Blvd., Suite 200, Richmond, CA 94804, telephone (510) 215-3502, Bruce@Pixar.com. The sources were formated for consistency with the indent program, available via anonymous ftp from ftp://prep.ai.mit.edu/pub/gnu/ in /pub/gnu/indent.1.9.1.tar.gz.

John Conover
john@email.johncon.com
January 6, 2006


  Date: Nov 07 1999, 17:08:11.
  Note: Line counts do NOT include lines from header files.

  csv2tsinvest

      main

          tsgetopt             function
          printf               function
          printf               function
          fopen                function
          fgets                function
          strtoken             function
          atof                 function
          strtoken             function
          atoi                 function
          strcmp               function
          strcmp               function
          strcmp               function
          strcmp               function
          strcmp               function
          strcmp               function
          strcmp               function
          strcmp               function
          strcmp               function
          strcmp               function
          strcmp               function
          strcmp               function
          atoi                 function
          realloc              function
          fprintf              function
          fprintf              function
          fprintf              function
          fprintf              function
          printf               function
          fclose               function
          free                 function
          fprintf              function
          exit                 function

          Complexity, 34  (very high)
          Density, 1.727273

          length, 733.090820
          volume, 5642.929688
          % abstraction, 0.205738

      strtoken

          strcpy               function
          strtok               function
          strtok               function

          Complexity, 2  (low)
          Density, 2.166667

          length, 77.302971
          volume, 272.025330
          % abstraction, 9.288177

      tsgetopt

          strcmp               function
          strchr               function
          fprintf              function
          fprintf              function

          Complexity, 12  (moderate)
          Density, 2.166667

          length, 202.277756
          volume, 1669.523438
          % abstraction, 1.083827

  File csv2tsinvest has:
      Manifest constants: 6
      Executable lines: 129
      Comment lines with text: 282
      Declaration lines: 24
      Whitespace lines: 259
      Preprocessor lines: 26
      Suppressed lines: 16
      Punctuation lines: 99
      TOTAL LINES: 835

      Low-level statements: 70
      Non-executable statements: 9
      High-level statements: 79
      TOTAL STATEMENTS: 158

      Macros defined: 75
      Functions defined: 3

      Executable lines per function:
          Mean: 41.333332
          Minimum: 6.000000
          Std.Dev: 34.422215
          Maximum: 88.000000

      Function Density (operators per executable line):
          Mean: 2.020202
          Std.Dev: 0.207132

      Function Complexity (McCabe):
          Mean: 16.000000
          Std.Dev: 13.366625
          Maximum: 34.000000

      Histogram:

      0 +
      1 +
      2 + x
      3 +
      4 +
      5 +
      6 +
      7 +
      8 +
      9 +
     10 +
     11 +
     12 + x
     13 +
     14 +
     15 +
     16 +
     17 +
     18 +
     19 +
     20 +
  [1 case was above 20]

      Level of Function Abstraction (percent)

      Histogram:

          0 + xx
          5 + x
         10 +
         15 +
         20 +
         25 +
         30 +
         35 +
         40 +
         45 +
         50 +

      Halstead Volume: 9791.950195
      Halstead Length: 985.125671
      Halstead Purity: 0.729183
      Halstead Effort: 605192.312500

      259 whitespace lines
      129 executable lines
      835 source-file lines

        

A license is hereby granted to reproduce this software source code and to create executable versions from this source code for personal, non-commercial use. The copyright notice included with the software must be maintained in all copies produced.

THIS PROGRAM IS PROVIDED "AS IS". THE AUTHOR PROVIDES NO WARRANTIES WHATSOEVER, EXPRESSED OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY, TITLE, OR FITNESS FOR ANY PARTICULAR PURPOSE. THE AUTHOR DOES NOT WARRANT THAT USE OF THIS PROGRAM DOES NOT INFRINGE THE INTELLECTUAL PROPERTY RIGHTS OF ANY THIRD PARTY IN ANY COUNTRY.

So there.

Copyright © 1994-2011, John Conover, All Rights Reserved.


Comments and/or bug reports should be addressed to:

john@email.johncon.com

http://www.johncon.com/
http://www.johncon.com/ntropix/
http://www.johncon.com/ndustrix/
http://www.johncon.com/nformatix/
http://www.johncon.com/ndex/
John Conover
john@email.johncon.com
January 6, 2006



Home | Installation | Usage | FAQs | Utilities | Architecture | QA | Tests | Links | Mailing List | License | Author | Download | Thanks


Copyright © 1994-2011 John Conover, john@email.johncon.com. All Rights Reserved.
Last modified: Sun Apr 24 00:00:38 PDT 2011 $Id: QA.html,v 1.0 2011/04/24 07:02:19 conover Exp $
Valid HTML 4.0!