home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lclint.zip / lclint-2_3h-os2-bin.zip / README < prev    next >
Text File  |  1997-09-03  |  5KB  |  129 lines

  1.                LCLint Version 2.3
  2.                MIT/LCS Distribution Site
  3.                  2 September 1997
  4.  
  5.                   David Evans
  6.              evs@larch.lcs.mit.edu
  7.  
  8. LCLint is a tool for statically checking C programs.  With minimal
  9. effort, LCLint can be used as a better lint.  If additional effort is
  10. invested adding annotations to programs, LCLint can perform stronger
  11. checks than can be done by any standard lint.
  12.  
  13. LCLint does many of the traditional lint checks including unused
  14. declarations, type inconsistencies, use-before-definition, unreachable
  15. code, ignored return values, execution paths with no return, likely
  16. infinite loops, and fall-through cases.  Our main focus, however, is on
  17. more powerful checks that are made possible by additional information
  18. given in source code annotations.  Annotations are stylized comments
  19. that document certain assumptions about functions, variables,
  20. parameters, and types.  They may be used to indicate where the
  21. representation of a user-defined type is hidden, to limit where a global
  22. variable may be used or modified, to constrain what a function
  23. implementation may do to its parameters, and to express checked
  24. assumptions about variables, types, structure fields, function
  25. parameters, and function results.  In addition to the checks
  26. specifically enabled by annotations, many of the traditional lint checks
  27. are improved by exploiting this additional information.
  28.  
  29. Some problems detected by LCLint include:
  30.  
  31. o Violations of information hiding.  A user-defined type can be declared
  32.   as abstract, and a message is reported where code inappropriately
  33.   depends on the representation of the type.
  34.  
  35. o Inconsistent modification of caller-visible state.  Functions can be
  36.   annotated with information on what caller-visible state may be modified
  37.   by the function, and an error is reported if the modifications produces
  38.   by the function contradict its declaration.  
  39.  
  40. o Inconsistent use of global variables.  Information on what global and
  41.   file scope variables a function may use can be added to function
  42.   declarations, and a message is reported if the implementation of the
  43.   function uses other global variables or does not uses every global
  44.   variable listed in its declaration.  
  45.  
  46. o Memory management errors.  Instances where storage that has been
  47.   deallocated is used, or where storage is not deallocated (memory leaks).
  48.  
  49. o Dangerous data sharing or unexpected aliasing.  Parameters to a
  50.   function share storage in a way that may lead to undefined or undesired
  51.   behavior, or a reference to storage within the representation of an
  52.   abstract type is created.  
  53.  
  54. o Using possibly undefined storage or returning storage that is not
  55.   completely defined (except as documented).  
  56.  
  57. o Dereferencing a possibly null pointer.  
  58.  
  59. o Dangerous macro implementations or invocations. 
  60.  
  61. o Violations of customizable naming conventions. 
  62.  
  63. o Program behavior that is undefined because it depends on order of
  64.   evaluation, likely infinite loops, fall-through cases, incomplete logic,
  65.   statements with no effect, ignored return values, unused declarations,
  66.   and exceeding certain standard limits.  
  67.  
  68. LCLint checking can be customized to select what classes of errors are
  69. reported using command line flags and stylized comments in the code.
  70.  
  71. For more information, please visit the LCLint home page at
  72.  
  73.     http://larch-www.lcs.mit.edu:8001/larch/lclint/
  74.  
  75. We are very interested in hearing about your experiences using LCLint.
  76. Send any questions or comments to lclint@larch.lcs.mit.edu.
  77.  
  78. There are two mailing lists associated with LCLint:
  79.  
  80.    lclint-announce@larch.lcs.mit.edu
  81.  
  82.       Reserved for announcements of new releases and bug fixes.
  83.  
  84.    lclint-interest@larch.lcs.mit.edu
  85.  
  86.       Informal discussions on the use and development of lclint.
  87.  
  88. Send a (human-readable) message to lclint-request@larch.lcs.mit.edu to
  89. subscribe to a list.  Everyone who uses lclint should subscribe to
  90. lclint-announce, to be informed of new releases.
  91.  
  92. Build Instructions
  93. ==================
  94.  
  95. To build LCLint you need:
  96.  
  97.    * a (hopefully ANSI-conforming) C compiler. On most modern Unix systems,
  98.      cc will work fine. For older or less standard systems, gcc is
  99.      recommended.
  100.    * gmake, the GNU make utility. If you don't have gmake installed on your
  101.      system, download it from prep.ai.mit.edu.
  102.    * standard Unix tools: uncompress or gzip compression utility, tar
  103.      archive utility, csh command shell.
  104.  
  105. Build Instructions:
  106.  
  107. Download the LCLint source package (lclint.src.tar.gz).
  108.  
  109. Copy this package to the directory where you want to build LCLint.  When
  110. the tar file is extracted, it will create an lclint subdirectory in this
  111. directory.
  112.  
  113. Uncompress the package. If you downloaded the gzip package, run: 
  114.       gzip -d lclint.src.tar.gz 
  115.  
  116. Extract files from the tar archive. Run tar xf lclint.src.tar. This will
  117. create an lclint directory, containing several subdirectories.
  118.  
  119. Run configure. This will create a Makefile with settings for your
  120. system. If you want to install LCLint or associated libraries different
  121. directories, edit the Makefile.
  122.  
  123. Run gmake. It is best to do this in an emacs shell or a buffered
  124. terminal, so you can scroll through the output.
  125.  
  126. Run gmake test. Check test output. If there are errors, send a bug
  127. report to lclint-bug@larch.lcs.mit.edu
  128.  
  129.