home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lclint.zip / lclintguide-os2.zip / lclint.INF (.txt) < prev    next >
OS/2 Help File  |  1997-08-29  |  200KB  |  7,722 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. LCLint User's Guide ΓòÉΓòÉΓòÉ
  3.  
  4.  
  5.  
  6.                                LCLint User's Guide
  7.  
  8.  
  9.  
  10.  
  11.  
  12.                                    Version 2.3
  13.  
  14.                                    August 1997
  15.  
  16.  
  17.  
  18.  
  19.  
  20.                                    David Evans
  21.  
  22.                       Systematic Program Development Group
  23.  
  24.                        MIT Laboratory for Computer Science
  25.  
  26.   Converted from guide.html using HTML2IIPF by Herbert at 28 Aug 1997, 01:10am
  27.  
  28.  
  29.  
  30.  LCLint is a tool for statically checking C programs.  With minimal effort, 
  31. LCLint can be used as a better lint.[1]  If additional effort is invested 
  32. adding annotations to programs, LCLint can perform stronger checks than can be 
  33. done by any standard lint. 
  34.  
  35. Some problems detected by LCLint include: 
  36.  
  37.      Violations of information hiding.  A user-defined type can be declared as 
  38.       abstract, and a message is reported where code inappropriately depends on 
  39.       the representation of the type.  (Section 3) 
  40.  
  41.  
  42.      Inconsistent modification of caller-visible state.  Functions can be 
  43.       annotated with information on what caller-visible state may be modified 
  44.       by the function, and an error is reported if the modifications produced 
  45.       by the function contradict its declaration.  (Section 4.1) 
  46.  
  47.  
  48.      Inconsistent use of global variables.  Information on what global and 
  49.       file scope variables a function may use can be added to function 
  50.       declarations, and a message is reported if the implementation of the 
  51.       function uses other global variables or does not uses every global 
  52.       variable listed in its declaration.  (Section 4.2) 
  53.  
  54.  
  55.      Memory management errors.  Instances where storage that has been 
  56.       deallocated is used, or where storage is not deallocated (memory leaks). 
  57.       (Section 5) 
  58.  
  59.  
  60.      Dangerous data sharing or unexpected aliasing.  Parameters to a function 
  61.       share storage in a way that may lead to undefined or undesired behavior, 
  62.       or a reference to storage within the representation of an abstract type 
  63.       is created. (Section 6) 
  64.  
  65.  
  66.      Using possibly undefined storage or returning storage that is not 
  67.       completely defined (except as documented).  (Section 7.1) 
  68.  
  69.  
  70.      Dereferencing a possibly null pointer.  (Section 7.2) 
  71.  
  72.  
  73.      Dangerous macro implementations or invocations. (Section 8) 
  74.  
  75.  
  76.      Violations of customizable naming conventions. (Section 9) 
  77.  
  78.  
  79.      Program behavior that is undefined because it depends on order of 
  80.       evaluation, likely infinite loops, fall-through cases, incomplete logic, 
  81.       statements with no effect, ignored return values, unused declarations, 
  82.       and exceeding certain standard limits.  (Section 10) 
  83.  
  84.  
  85.  LCLint checking can be customized to select what classes of errors are 
  86.  reported using command line flags and stylized comments in the code. 
  87.  
  88.  This document is a guide to using LCLint.  Section 1 is a brief overview of 
  89.  the design goals of LCLint. Section 2 explains how to run LCLint, interpret 
  90.  messages produce, and control checking. Sections 3-10 describe particular 
  91.  checks done by LCLint. 
  92.  
  93.   Contents 
  94.  
  95.  
  96.    1. Overview 
  97.    2. Operation 
  98.           Messages 
  99.           Flags 
  100.           Stylized Comments 
  101.              -  Annotations 
  102.              -  Control Comments 
  103.    3. Abstract Types 
  104.           Access 
  105.           Mutability 
  106.           Boulean Types 
  107.           Primitive C Types 
  108.              -  Characters 
  109.              -  Enumerators 
  110.              -  Numeric Types 
  111.              -  Arbitrary Integral Types 
  112.    4. Function Interfaces 
  113.           Modifications 
  114.              -  Special Modifications 
  115.              -  Missing Modifies Clauses 
  116.              -  Limitations 
  117.           Global Variables 
  118.              -  Controlling Globals Checking 
  119.           Declaration Consistency 
  120.    5. Memory Management 
  121.           Storage Model 
  122.           Deallocation Errors 
  123.              -  Unshared References 
  124.              -  Temporary Parameters 
  125.              -  Owned and Dependent References 
  126.              -  Kept Parameters 
  127.              - 
  128.              -  Stack References 
  129.              -  Inner Storage 
  130.           Implicit Memory Annotations 
  131.           Reference Counting 
  132.    6. Sharing 
  133.           Aliasing 
  134.              -  Unique Parameters 
  135.              -  Returned Parameters 
  136.           Exposure 
  137.              -  Read-Only Storage 
  138.              -  Exposed Storage 
  139.    7. Value Constraints 
  140.           Use Before Definition 
  141.              -  Undefined Parameters 
  142.              -  Relaxing Checking 
  143.              -  Partially Defined Structures 
  144.              -  Global Variables 
  145.           Null Pointers 
  146.              -  Predicate Functions 
  147.              -  Overriding Null Types 
  148.              -  Relaxing Null Checking 
  149.           Execution 
  150.           Special Clauses 
  151.    8. Macros 
  152.           Constant Macros 
  153.           Function-like Macros 
  154.              -  Side-Effect Free Parameters 
  155.              -  Polymorphism 
  156.           Controlling Macro Checking 
  157.           Iterators 
  158.    9. Naming Conventions 
  159.           Type-Based Naming Conventions 
  160.              -  Czech Names 
  161.              -  Slovak Names 
  162.              -  Czechoslovak Names 
  163.           Namespace Prefixes 
  164.           Naming Restrictions 
  165.              -  Reserved Names 
  166.              -  Distinct Identifiers 
  167.   10. Other Checks 
  168.           Undefined Evaluation Order 
  169.           Problematic Control Structures 
  170.              -  Likely Infinite Loops 
  171.              -  Switches 
  172.              -  Deep Breaks 
  173.              -  Loop and If Bodies 
  174.              -  Complete if-else Logic 
  175.           Suspicious Statements 
  176.              -  Statements with No Effects 
  177.              -  Ignored Return Values 
  178.           Unused Declarations 
  179.           Complete Programs 
  180.              -  Unnecessary External Names 
  181.              -  Declarations Missing from Headers 
  182.           Compiler Limits 
  183.  
  184.  
  185.  Appendices 
  186.  
  187.  Appendix A.  Availability 
  188.  Appendix B.  Communication 
  189.  Appendix C.  Flags 
  190.  Appendix D.  Annotations 
  191.  Appendix E.  Control Comments 
  192.  Appendix F.  Libraries 
  193.  Appendix G.  Specifications 
  194.  Appendix H.  Emacs 
  195.  
  196.  
  197.  
  198.  Figures 
  199.  
  200.  
  201.  References 
  202.  Acknowledgements 
  203.  
  204.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  205.  
  206.   David Evans 
  207.  Systematic Program Development 
  208.  evs@larch.lcs.mit.edu 
  209.  
  210.  
  211. ΓòÉΓòÉΓòÉ 1.1. LCLint User's Guide - 1. Overview ΓòÉΓòÉΓòÉ
  212.  
  213.  
  214.  
  215. 1. Overview 
  216.  
  217. The main goals for LCLint are to: 
  218.  
  219.  
  220.      Detect a large number of bugs in typical C programs, without producing an 
  221.       unacceptable number of spurious messages.  We are willing to accept the 
  222.       possibility that a few spurious messages are produced as long as it 
  223.       enables significantly more powerful checking and the spurious messages 
  224.       can be suppressed easily. 
  225.  
  226.  
  227.      Support a programming methodology involving abstract types and clean, 
  228.       documented interfaces in standard C programs. 
  229.  
  230.  
  231.      Provide a gradual transition for programmers.  LCLint can be used like a 
  232.       better standard lint with minimal effort.  Adding a few annotations to 
  233.       programs enables significantly better checking.  As more effort is put 
  234.       into annotating programs, better checking results. A representational 
  235.       effort/benefit curve for using LCLint is shown in Figure 1 (not available 
  236.       in HTML format).  As different checks are turned on and more information 
  237.       is given in code annotations the number of bugs that can be detected 
  238.       increases dramatically. 
  239.  
  240.  
  241.      Provide enough flexibility so that LCLint can be used effectively with a 
  242.       wide range of coding styles.  Especially important is making it easy to 
  243.       use LCLint effectively to maintain and modify legacy code. 
  244.  
  245.  
  246.      Check programs quickly and with no user interaction.  LCLint runs faster 
  247.       than most compilers.  Libraries can be used to enable fast checking of a 
  248.       few modules in a large program. 
  249.  
  250.   LCLint does many of the traditional lint checks including unused 
  251.  declarations, type inconsistencies, use-before-definition, unreachable code, 
  252.  ignored return values, execution paths with no return, likely infinite loops, 
  253.  and fall-through cases.  This document focuses on more powerful checks that 
  254.  are made possible by additional information given in source code annotations. 
  255.  [2]  Annotations are stylized comments that document certain assumptions about 
  256.  functions, variables, parameters, and types. They may be used to indicate 
  257.  where the representation of a user-defined type is hidden, to limit where a 
  258.  global variable may be used or modified, to constrain what a function 
  259.  implementation may do to its parameters, and to express checked assumptions 
  260.  about variables, types, structure fields, function parameters, and function 
  261.  results.  In addition to the checks specifically enabled by annotations, many 
  262.  of the traditional lint checks are improved by exploiting this additional 
  263.  information. 
  264.  
  265.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  266.  
  267.   David Evans 
  268.  Systematic Program Development 
  269.  evs@larch.lcs.mit.edu 
  270.  
  271.  
  272. ΓòÉΓòÉΓòÉ 1.2. LCLint User's Guide - 2. Operation ΓòÉΓòÉΓòÉ
  273.  
  274.  
  275.  
  276.  2. Operation 
  277.  
  278. LCLint is invoked by listing files to be checked.  Initialization files, 
  279. command line flags, and stylized comments may be used to customize checking 
  280. globally and locally. 
  281.  
  282. The best way to learn to use LCLint, of course, is to actually use it (if you 
  283. don't already have LCLint installed on your system, download it).  Before you 
  284. read much further in this document, I recommend finding a small C program. 
  285. Then, try running: 
  286.  
  287. lclint *.c 
  288.  
  289. For the most C programs, this will produce a large number of messages.  To turn 
  290. off reporting for some of the messages, try: 
  291.  
  292. lclint -weak *.c 
  293.  
  294. The -weak flag is a mode flag that sets many checking parameters to select 
  295. weaker checking than is done in the default mode.  Other LCLint flags will be 
  296. introduced in the following sections;  a complete list is given in Appendix C. 
  297.  
  298. 2.1 Messages 
  299.  
  300. The format and content of messages printed by LCLint can be customized by the 
  301. user. A typical message is: 
  302.  
  303. sample.c: (in function faucet)
  304. sample.c:11,12: Fresh storage x not released before return
  305.   A memory leak has been detected.  Newly-allocated or only-qualified storage
  306.   is not released before the last reference to is it lost.  Use -mustfree to
  307.   suppress message.
  308.    sample.c:5,47: Fresh storage x allocated
  309.  The first line gives the name of the function in which the error is found. 
  310. This is printed before the first message reported for a function.  (The 
  311. function context is not printed if -showfunc is used.) 
  312.  
  313. The second line is the text of the message.  This message reports a memory leak 
  314. - storage allocated in a function is not deallocated before the function 
  315. returns. The text is preceded by the file name, line and column number where 
  316. the error is located.  The column numbers are used by the emacs mode (see 
  317. Appendix H) to jump to the appropriate line and column location.  (Column 
  318. numbers are not printed if -showcolumn is used.) 
  319.  
  320. The next line is a hint giving more information about the suspected error. Most 
  321. hints also include information on how the message may be suppressed.  For this 
  322. message, setting the -mustfree flag would prevent the message from being 
  323. reported.  Hints may be turned off by using -hints.  Normally, a hint is given 
  324. only the first time a class of error is reported. To have LCLint print a hint 
  325. for every message regardless, use +forcehints. 
  326.  
  327. The final line of the message gives additional location information.  For this 
  328. message, it tells where the leaking storage is allocated. 
  329.  
  330. The generic message format is (parts enclosed in square brackets are optional): 
  331.  
  332.   [<file>:<line> (in <context>)]
  333.   <file>:<line>[,<column>]: message
  334.      [hint]
  335.       <file>:<line>,<column>: extra location information, if appopriate
  336.  
  337. The text of messages and hints may be longer than one line.  They are split 
  338. into lines of length less than the value set using -linelen <number>.  The 
  339. default line length is 80 characters.  LCLint attempts to split lines in a 
  340. sensible place as near to the line length limit as possible. 
  341.  
  342.  2.2 Flags 
  343.  
  344. So that many programming styles can be supported, LCLint provides over 300 
  345. flags for controlling checking and message reporting.  Some of the flags are 
  346. introduced in the body of this document.  Apppendix C describes every flag. 
  347. Modes and shortcut flags are provided for setting many flags at once. 
  348. Individual flags can override the mode settings. 
  349.  
  350. Flags are preceded by + or -.  When a flag is preceded by + we say it is on; 
  351. when it is preceded by - it is off. The precise meaning of on and off depends 
  352. on the type of flag. 
  353.  
  354. The +/- flag settings are used for consistency and clarity, but contradict 
  355. standard UNIX usage and is easy to accidentally use the wrong one.  To reduce 
  356. the likelihood of using the wrong flag, LCLint issues warnings when a flag is 
  357. set in an unusual way.  Warnings are issued when a flag is redundantly set to 
  358. the value it already had (these errors are not reported if the flag is set 
  359. using a stylized comment), if a mode flag or special flag is set after a more 
  360. specific flag that will be set by the general flag was already set, if value 
  361. flags are given unreasonable values, of if flags are set in an inconsistent 
  362. way.  The -warnflags flag suppresses these warnings. 
  363.  
  364. Default flag settings will be read from ~/.lclintrc if it is readable.  If 
  365. there is a .lclintrc file in the working directory, settings in this file will 
  366. be read next and its settings will override those in ~/.lclintrc.  Command-line 
  367. flags override settings in either file.  The syntax of the .lclintrc file is 
  368. the same as that of command-line flags, except that flags may be on separate 
  369. lines and the # character may be used to indicate that the remainder of the 
  370. line is a comment. The -nof flag prevents the  ~/.lclintrc file from being 
  371. loaded.  The -f <filename> flag loads options from filename. 
  372.  
  373.  2.3 Stylized Comments 
  374.  
  375. Stylized comments are used to provide extra information about a type, variable 
  376. or function interface to improve checking, or to control flag settings locally. 
  377.  
  378. All stylized comments begin with /*@ and are closed by the end of the comment. 
  379. The role of the @ may be played by any printable character.  Use -commentchar 
  380. <char> to select a different stylized comment marker. 
  381.  
  382. 2.3.1 Annotations 
  383.  
  384. Annotations are stylized comments that follow a definite syntax.  Although they 
  385. are comments, they may only be used in fixed grammatical contexts (e.g., like a 
  386. type qualifier). 
  387.  
  388. Syntactic comments for function interfaces are described in Section 4; comments 
  389. for declaring constants in Section 8.1. and comments for declaring iterators in 
  390. Section 8.4. Sections 3-8 include descriptions of annotations for expressing 
  391. assumptions about variables, parameters, return values, structure fields and 
  392. type definitions.  A summary of annotations is found in Apppendix D. 
  393.  
  394. 2.3.2 Control Comments 
  395.  
  396. Unlike annotations, control comments may appear between any two tokens in a C 
  397. program.[3]  Syntactically, they are no different from standard comments. 
  398. Control comments are used to provide source-level control of LCLint checking. 
  399. They may be used to suppress spurious messages, set flags, and control checking 
  400. locally in other ways.  A complete description of control comments is found in 
  401. Apppendix E. 
  402.  
  403. Most flags (all except those characterized as "global" in Apppendix C) can be 
  404. set locally using control comments.  A control comment can set flags locally to 
  405. override the command line settings.  The original flag settings are restored 
  406. before processing the next file. The syntax for setting flags in control 
  407. comments is the same as that of the command line, except that flags may also be 
  408. preceded by = to restore their setting to the original command-line value.  For 
  409. instance, 
  410.  
  411. /*@+boolint -modifies =showfunc@*/
  412. sets boolint on (this makes bool and int indistinguishable types), sets 
  413. modifies off (this prevents reporting of modification errors), and sets 
  414. showfunc to its original setting (this controls  whether or not the name of a 
  415. function is displayed before a message). 
  416.  
  417. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  418.  
  419.  David Evans 
  420. Systematic Program Development 
  421. evs@larch.lcs.mit.edu 
  422.  
  423.  
  424. ΓòÉΓòÉΓòÉ 1.3. LCLint User's Guide - 3. Abstract Types ΓòÉΓòÉΓòÉ
  425.  
  426.  
  427.  
  428.  3. Abstract Types 
  429.  
  430. Traditionally, programming books wax mathematical when they arrive at the topic 
  431. of abstract data types╨ò Such books make it seem as if you'd never actually use 
  432. an abstract data type except as a sleep aid. 
  433.  
  434. - Steve McConnell 
  435.  
  436. Information hiding is a technique for handling complexity.  By hiding 
  437. implementation details, programs can be understood and developed in distinct 
  438. modules and the effects of a change can be localized.  One technique for 
  439. information hiding is data abstraction.  An abstract type is used to represent 
  440. some natural program abstraction.  It provides functions for manipulating 
  441. instances of the type.  The module that implements these functions is called 
  442. the implementation module.  We call the functions that are part of the 
  443. implementation of an abstract type the operations of the type.  Other modules 
  444. that use the abstract type are called clients. 
  445.  
  446. Clients may use the type name and operations, but should not manipulate or rely 
  447. on the actual representation of the type.  Only the implementation module may 
  448. manipulate the representation of an abstract type.  This hides information, 
  449. since implementers and maintainers of client modules should not need to know 
  450. anything about how the abstract type is implemented. It provides modularity, 
  451. since the representation of an abstract type can be changed without having to 
  452. change any client code. 
  453.  
  454. LCLint supports abstract types by detecting places where client code depends on 
  455. the concrete representation of an abstract type. 
  456.  
  457. To declare an abstract type, the abstract annotation is added to a typedef. For 
  458. example (in mstring.h), 
  459.  
  460. typedef /*@abstract@*/ char *mstring;
  461. declares mstring as an abstract type.  It is implemented using a char *, but 
  462. clients of the type should not depend on or need to be aware of this.  If it 
  463. later becomes apparent that a better representation such as a string table 
  464. should be used, we should be able to change the implementation of mstring 
  465. without having to change or inspect any client code. 
  466.  
  467. In a client module, abstract types are checked by name, not structure.  LCLint 
  468. reports an error if an instance of mstring is passed as a char * (for instance, 
  469. as an argument to strlen), since the correctness of this call depends on the 
  470. representation of the abstract type.  LCLint also reports errors if any C 
  471. operator except assignment (=) or sizeof is used on an abstract type.  The 
  472. assignment operator is allowed since its semantics do not depend on the 
  473. representation of the type.[4]  The use of sizeof is also permitted, since this 
  474. is the only way for clients to allocate pointers to the abstract type.  Type 
  475. casting objects to or from abstract types in a client module is an abstraction 
  476. violation and will generate a warning message. 
  477.  
  478. Normally, LCLint will assume a type definition is not abstract unless the 
  479. /*@abstract@*/ qualifier is used.  If instead you want all user-defined types 
  480. to be abstract types unless they are marked as concrete, the +impabstract flag 
  481. can be used.  This adds an implicit abstract annotation to any typedef that is 
  482. not marked with /*@concrete@*/. 
  483.  
  484. Some examples of abstraction violations detected by LCLint are shown in Figure 
  485. 2. 
  486.  
  487.  
  488.  
  489.  3.1 Access 
  490.  
  491. Where code may manipulate the representation of an abstract type, we say the 
  492. code has access to that type.  If code has access to an abstract type, the 
  493. representation of the type and the abstract type are indistinguishable. 
  494. Usually, an abstract type is implemented by a single program module that is the 
  495. only code that has access to the type representation.  Sometimes, more 
  496. complicated access control is desired if the implementation of an abstract type 
  497. is split across program files, or particular client code needs to access the 
  498. representation. 
  499.  
  500. There are a several ways of selecting what code has access the representation 
  501. of an abstract type: 
  502.  
  503.      Modules.  An abstract type defined in M.h is accessible in M.c. 
  504.       Controlled by the accessmodule flag.  This means when accessmodule is on, 
  505.       as it is by default, the module access rule is in effect.  If 
  506.       accessmodule is off (when -accessmodule is used), the module access rule 
  507.       is not in effect and an abstract type defined in M.h is not necessarily 
  508.       accessible in M.c 
  509.  
  510.  
  511.      File names.  An abstract type named type is accessible in files named 
  512.       type.<extenstion>.  For example, the representation of mstring is be 
  513.       accessible in mstring.h and mstring.c.  Controlled by the accessfile 
  514.       flag. 
  515.  
  516.  
  517.      Function names.  An abstract type named type may be accessible in a 
  518.       function named type_name or typeName.  For example, mstring_length and 
  519.       mstringLength would have access to the mstring abstract type.  Controlled 
  520.       by the naming convention (see Section 9). 
  521.  
  522.  
  523.      Access control comments. The syntax /*@access type,+@*/[6] allows the 
  524.       following code to access the representation of type.  Similarly, 
  525.       /*@noaccess type,+@*/ restricts access to the representation of type. 
  526.       The type in a noaccess comment must have been declared as an abstract 
  527.       type. 
  528.  
  529.  
  530.   3.2 Mutability 
  531.  
  532.  We can view types as being mutable or immutable.  A type is mutable if the 
  533.  value of an instance of the type can be changed by passing it as a parameter 
  534.  to a function call.[7]  For example, the primitive type int is immutable.  If 
  535.  i is a local variable of type int and no variables point to the location where 
  536.  i is stored, the value of i must be the same before and after the call f(i). 
  537.  Structure and union types are also immutable, since they are copied when they 
  538.  are passed as arguments.  On the other hand, pointer types are mutable.  If x 
  539.  is a local variable of type int *, the value of *x (and hence, the value of 
  540.  the object x) can be changed by the function call g(x). 
  541.  
  542.  The mutability of a concrete type is determined by its type definition. For 
  543.  abstract types, mutability does not depend on the type representation but on 
  544.  what operations the type provides. If an abstract type has operations that may 
  545.  change the value of instances of the type, the type is mutable.  If not, it is 
  546.  immutable.  The value of an instance of an immutable type never changes. 
  547.  Since object sharing is noticeable only for mutable types, they are checked 
  548.  differently from immutable types. 
  549.  
  550.  The /*@mutable@*/ and /*@immutable@*/ annotations are used to declare an 
  551.  abstract type as mutable or immutable.  (If neither is used, the abstract type 
  552.  is assumed to be mutable.)  For example, 
  553.  
  554.    typedef /*@abstract@*/ /*@mutable@*/ char *mstring;   typedef /*@abstract@*/ 
  555.  /*@immutable@*/ int weekDay; declares mstring as a mutable abstract type and 
  556.  weekDay as  an immutable abstract type. 
  557.  
  558.  Clients of  a mutable abstract type need to know the semantics of assignment. 
  559.  After the assignment expression s = t, do s and t refer to the same object 
  560.  (that is, will changes to the value of s also change the value of t)? 
  561.  
  562.  LCLint prescribes that all abstract types have sharing semantics, so s and t 
  563.  would indeed be the same object.  LCLint will report an error if a mutable 
  564.  type is implemented with a representation (e.g., a struct) that does not 
  565.  provide sharing semantics (controlled by mutrep flag). 
  566.  
  567.  The mutability of an abstract type is not necessarily the same as the 
  568.  mutability of its representation. We could use the immutable concrete type int 
  569.  to represent mutable strings using an index into a string table, or declare 
  570.  mstring as immutable as long as no operations are provided that modify the 
  571.  value of an mstring. 
  572.  
  573.   3.3 Boolean Types 
  574.  
  575.  Standard C has no boolean representation - the result of a comparison operator 
  576.  is an integer, and no type checking is done for test expressions.  Many common 
  577.  errors can be detected by introducing a distinct boolean type and stronger 
  578.  type checking. 
  579.  
  580.  By convention, the bool type is used to represent boolean values.[8] 
  581.  Relations, comparisons and certain standard library functions are declared to 
  582.  return bool types. 
  583.  
  584.   LCLint checks that the test expression in an if, while, or for statement or 
  585.  an operand to &&, || or ! is a boolean.  If the type of a test expression is 
  586.  not a boolean, LCLint will report an error depending on the type of the test 
  587.  expression and flag settings.  If the test expression has pointer type, LCLint 
  588.  reports an error if predboolptr is on (this can be used to prevent messages 
  589.  for the idiom of  testing if a pointer is not null without a comparison).  If 
  590.  it is type int, an error is reported if predboolint is on. For all other 
  591.  types, LCLint reports an error if predboolothers is on. 
  592.  
  593.  Since using = instead of == is such a common bug, reporting of test 
  594.  expressions that are assignments is controlled by the separate predassign 
  595.  flag.  The message can be suppressed by adding extra parentheses around the 
  596.  test expression. 
  597.  
  598.  Apppendix C (page 50) describes other flags for controlling boolean checking. 
  599.  
  600.  Figure 3.  Boolean Checking 
  601.  
  602.   3.4 Primitive C Types 
  603.  
  604.  Two types have compatible type if their types are the same. 
  605.  - ANSI C, 3.1.2.6. 
  606.  
  607.  Two types need not be identical to be compatible. 
  608.  - ANSI C, footnote to 3.1.2.6.  LCLint supports stricter checking of primitive 
  609.  C types.  The char and enum types can be checked as distinct types, and the 
  610.  different numeric types can be type-checked strictly. 
  611.  
  612.   3.4.1 Characters 
  613.  
  614.  The primitive char type can be type-checked as a distinct type.  If char is 
  615.  used as a distinct type, common errors involving assigning ints to chars are 
  616.  detected. 
  617.  
  618.  The +charint flag can be used for checking legacy programs where char and int 
  619.  are used interchangeably.  If charint is on, char types indistinguishable from 
  620.  ints.  To keep char and int as distinct types, but allow chars to be used to 
  621.  index arrays, use +charindex. 
  622.  
  623.  3.4.2 Enumerators 
  624.  
  625.  Standard C treats user-declared enum types just like integers.  An arbitrary 
  626.  integral value may be assigned to an enum type, whether or not it was listed 
  627.  as an enumerator member.  LCLint checks each user-defined enum type as 
  628.  distinct type.  An error is reported if a value that is not an enumerator 
  629.  member is assigned to the enum type, or if an enum type is used as an operand 
  630.  to an arithmetic operator. 
  631.  
  632.  If the enumint flag is on, enum and int types may be used interchangeably. 
  633.  Like charindex, if  the enumindex flag is on, enum types may be used to index 
  634.  arrays. 
  635.  
  636.  3.4.3 Numeric Types 
  637.  
  638.  LCLint reports where numeric types are used in dangerous or inconsistent ways. 
  639.  With the strictest checking, LCLint will report an error anytime numeric types 
  640.  do not match exactly.  If the relaxquals flag is on, only those 
  641.  inconsistencies which may corrupt values are reported.  For example, if an int 
  642.  is assigned to a variable of type long (or passed as a long formal parameter), 
  643.  LCLint will not report an error if relaxquals is on since a long must have at 
  644.  least enough bits to store an int without data loss.  On the other hand, an 
  645.  error would be reported if the long were assigned to an int, since the int 
  646.  type may not have enough bits to store the long value. 
  647.  
  648.  Similarly, if a signed value is assigned to an unsigned, LCLint will report an 
  649.  error since an unsigned type cannot represent all signed values correctly.  If 
  650.  the ignoresigns flag is on, checking is relaxed to ignore all sign qualifiers 
  651.  in type comparisons (this is not recommended, since it will suppress reporting 
  652.  of real bugs, but may be necessary for quickly checking certain legacy code). 
  653.  
  654.  3.4.4 Arbitrary Integral Types 
  655.  
  656.   LCLint supports three different kinds of arbitrary integral types: 
  657.  
  658.  /*@integraltype@*/ 
  659.  
  660.  An arbitrary integral type.  The actual type may be any one of short, int, 
  661.  long, unsigned short, unsigned, or unsigned long . 
  662.  
  663.  /*@unsignedintegraltype@*/ 
  664.  
  665.  An arbitrary unsigned integral type.  The actual type may be any one of 
  666.  unsigned short, unsigned, or unsigned long . 
  667.  
  668.  /*@signedintegraltype@*/ 
  669.  
  670.  An arbitrary signed integral type.  The actual type may be any one of short, 
  671.  int, or long. 
  672.  
  673.  LCLint reports an error if the code depends on the actual representation of a 
  674.  type declared as an arbitrary integral.  The match-any-integral flag relaxes 
  675.  checking and allows an arbitrary integral type is allowed to match any 
  676.  integral type. 
  677.  
  678.   Other flags set the arbitrary integral types to a concrete type.  These 
  679.  should only be used if portability to platforms that may use different 
  680.  representations is not important.  The long-integral and 
  681.  long-unsigned-integral flags set the type corresponding to /*@integraltype@*/ 
  682.  to be unsigned long and long respectively. The long-unsigned-unsigned-integral 
  683.  flag sets the type corresponding to /*@unsignedintegraltype@*/ to be unsigned 
  684.  long. The long-signed-integral flag sets the type corresponding to 
  685.  /*@signedintegraltype@*/ to be long. 
  686.  
  687.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  688.  
  689.   David Evans 
  690.  Systematic Program Development 
  691.  evs@larch.lcs.mit.edu 
  692.  
  693.  
  694. ΓòÉΓòÉΓòÉ 1.4. LCLint User's Guide - 4. Function Interfaces ΓòÉΓòÉΓòÉ
  695.  
  696.  
  697.  
  698.  4. Function Interfaces 
  699.  
  700. Functions communicate with their calling environment through an interface.  The 
  701. caller communicates the values of actual parameters and global variables to the 
  702. function, and the function communicates to the caller through the return value, 
  703. global variables and storage reachable from the actual parameters.  By keeping 
  704. interfaces narrow (i.e., restricting the amount of information visible across a 
  705. function interface), we can understand and implement functions independently. 
  706.  
  707. A function prototype documents the interface to a function.  It serves as a 
  708. contract between the function and its caller.  In early versions of C, the 
  709. function "prototype" was very limited.  It described the type returned by the 
  710. function but nothing about its parameters.  The main improvement provided by 
  711. ANSI C was the ability to add information on the number and types of parameter 
  712. to a function.  LCLint provides the means to express much more about a function 
  713. interface: what global variable the function may use, what values visible to 
  714. the caller it may modify, if a pointer parameter may be a null pointer or point 
  715. to undefined storage, if storage pointed to by a parameter is deallocated 
  716. before the function returns, if the function may create new aliases to a 
  717. parameter, can the caller modify or deallocate the return value, etc. 
  718.  
  719. The extra interface information places constraints on both how the function may 
  720. be called and how it may be implemented.  LCLint reports places where these 
  721. constrains are not satisfied.  Typically, these indicate bugs in the code or 
  722. errors in the interface documentation. 
  723.  
  724. This section describes syntactic comments may be added to a function 
  725. declaration to document what global variables the function implementation may 
  726. use and what values visible to its caller it may modify.  Sections 5-7 describe 
  727. annotations may be added to parameters to constrain valid arguments to a 
  728. function and how these arguments may be used after the call and to the return 
  729. value to constrain results. 
  730.  
  731.  4.1 Modifications 
  732.  
  733. The modifies clause lists what values visible to the caller may be modified by 
  734. a function.  Modifies clauses limit what values a function may modify, but they 
  735. do not require that listed values are always modified.  The declaration, 
  736.  
  737. int f (int *p, int *q) /*@modifies *p@*/;
  738. declares a function f that may modify the value pointed to by its first 
  739. argument but may not modify the value of its second argument or any global 
  740. state. 
  741.  
  742. LCLint checks that a function does not modify any caller-visible value not 
  743. encompassed by its  modifies clause and does modify all values listed in its 
  744. modifies clause on some possible execution of the function.  Figure 4 shows an 
  745. example of modifies checking done by LCLint. 
  746.  
  747.  4.1.1 Special Modifications 
  748.  
  749. A few special names are provided for describing function modifications: 
  750.  
  751. internalState 
  752.  
  753. The function modifies some internal state (that is, the value of a static 
  754. variable).  Even though a client cannot access the internal state directly, it 
  755. is important to know that something may be modified by the function call both 
  756. for clear documentation and for checking undefined order of evaluation (Section 
  757. 10.1) and side-effect free parameters (Section 8.2.1). 
  758.  
  759.  fileSystem 
  760.  
  761. The function modifies the file system.  Any modification that may change the 
  762. system state is considered a file system modification.  All functions that 
  763. modify an object of type pointer to FILE also modify the file system.  In 
  764. addition, functions that do not modify a FILE pointer but modify some state 
  765. that is visible outside this process also modify the file system (e.g., 
  766. rename).  The flag mod-file-system controls reporting of undocumented file 
  767. system modifications.  nothing 
  768.  
  769. The function modifies nothing (i.e., it is side-effect free). 
  770.  
  771. The syntactic comment, /*@*/ in a function declaration or definition (after the 
  772. parameter list, before the semi-colon or function body) denotes a function that 
  773. modifies nothing and does not use any global variables (see Section 4.2). 
  774.  
  775. Figure 4.  Modifies checking. 
  776.  
  777.  
  778.  
  779.  4.1.2 Missing Modifies Clauses 
  780.  
  781. LCLint is designed so programs with many functions that are declared without 
  782. modifies clauses can be checked effectively.  Unless modnomods is in on, no 
  783. modification errors are reported checking a function declared with no modifies 
  784. clause. 
  785.  
  786. A function with no modifies clause is an unconstrained function since there are 
  787. no documented constraints on what it may modify.  When an unconstrained 
  788. function is called, it is checked differently from a function declared with a 
  789. modifies clause.  To prevent spurious errors, no modification error is reported 
  790. at the call site unless the moduncon flag is on.  Flags control whether errors 
  791. involving unconstrained functions are reported for other checks that depend on 
  792. modifications (side-effect free macro parameters (Section 8.2.1), undefined 
  793. evaluation order (Section 10.1), and likely infinite loops (Section 10.2.1).) 
  794.  
  795.  4.1.3 Limitations 
  796.  
  797. Determining whether a function modifies a particular parameter or global is in 
  798. general an undecidable[9] problem.  To enable useful checking, certain 
  799. simplifying assumptions are necessary.  LCLint assumes an object is modified 
  800. when it appears on the left hand side of an assignment or it is passed to a 
  801. function as a parameter which may be modified by that function (according to 
  802. the called function's modifies clause). Hence, LCLint will report spurious 
  803. modification errors for assignments that do not change the value of an object 
  804. or modifications that are always reversed before a procedure returns.  The 
  805. /*@-mods@*/ and /*@=mods@*/ control comments can be used around these 
  806. modifications to suppress the message. 
  807.  
  808.  4.2 Global Variables 
  809.  
  810. Another aspect of a function's interface, is the global variables it uses.  A 
  811. globals list in a function declaration lists external variables that may be 
  812. used in the function body. LCLint checks that global variables used in a 
  813. procedure match those listed in its globals list. A global is used in a 
  814. function if it appears in the body directly, or it is in the globals list of a 
  815. function called in the body. LCLint reports if a global that is used in a 
  816. procedure is not listed in its globals list, and if a listed global is not used 
  817. in the function implementation. 
  818.  
  819.  Figure 5 shows an example function definition with a globals list and 
  820. associated checking done by LCLint. 
  821.  
  822.  4.2.1 Controlling Globals Checking 
  823.  
  824. Whether on not an error is reported for a use of a global variable in a given 
  825. function depends on the scope of the variable (file static or external), the 
  826. checking annotation used in the variable declaration or the implicit annotation 
  827. if no checking annotation is used, whether or not the function is declared with 
  828. a globals list, and flag settings. 
  829.  
  830. A global or file static variable declaration may be preceded by an annotation 
  831. to indicate how the variable should be checked.  In order of decreasing checks, 
  832. the annotations are: 
  833.  
  834. /*@checkedstrict@*/ 
  835.  
  836. Strictest checking.  Undocumented uses and modifications of the variable are 
  837. reported in all functions whether or not they have a globals list (unless 
  838. checkstrictglobs is off).  /*@checked@*/ 
  839.  
  840. Undocumented use of the variable is reported in a function with a globals list, 
  841. but not in a function declared with no globals (unless globnoglobs is on). 
  842.  
  843.  /*@checkmod@*/ 
  844.  
  845. Undocumented uses of the variable are not reported, but undocumented 
  846. modifications are reported.  (If modglobsnomods is on, errors are reported even 
  847. in functions declared with no modifies clause or globals list.) 
  848. /*@unchecked@*/ 
  849.  
  850. No messages are reported for undocumented use or modification of this global 
  851. variable.  If a variable has none of these annotations, an implicit annotation 
  852. is determined by the flag settings. 
  853.  
  854. Different flags control the implicit annotation for variables declared with 
  855. global scope and variables declared with file scope (i.e., using the static 
  856. storage qualifier). To set the implicit annotation for global variables 
  857. declared in context (globs for external variables or statics for file static 
  858. variable) to be annotation (checked, checkmod, checkedstrict ) use 
  859. imp<annotation><context>.  For example, +impcheckedstrictstatics makes the 
  860. implicit checking on unqualified file static variables checkedstrict.  (See 
  861. Apppendix C, page 51, for a complete list of globals checking flags.) 
  862.  
  863.  4.3 Declaration Consistency 
  864.  
  865. LCLint checks that function declarations and definitions are consistent.  The 
  866. general rule is that the first declaration of a function imply all later 
  867. declarations and definitions.  If a function is declared in a header file, the 
  868. first declaration processed is its first declaration (if it is declared in more 
  869. than one header file an error is reported if redecl is set).  Otherwise, the 
  870. first declaration in the file defining the function is its first declaration. 
  871.  
  872. Later declarations may not include variables in the globals list that were not 
  873. included in the first declaration.  The exception to this is when the first 
  874. declaration is in a header file and the later declaration or definition 
  875. includes file static variables.  Since these are not visible in the header 
  876. file, they can not be included in the header file declaration.  Similarly, the 
  877. modifies clause of a later declaration may not include objects that are not 
  878. modifiable in the first declaration.  The later declaration may be more 
  879. specific.  For example, if the header declaration is: 
  880.  
  881. extern void setName (employee e, char *s) /*@modifies e@*/;
  882. the later declaration could be, 
  883.  
  884.    void setName (employee e, char *) /*@modifies e->name@*/;
  885. If employee is an abstract type, the declaration in the header should not refer 
  886. to a particular implementation (i.e., it shouldn't rely on there being a name 
  887. field), but the implementation declaration can be more specific. 
  888.  
  889. This rule also applies to file static variables.  The header declaration for a 
  890. function that modifies a file static variable should use modifies internalState 
  891. since file static variables are not visible to clients.  The implementation 
  892. declaration should list the actual file static variables that may be modified. 
  893.  
  894. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  895.  
  896.  David Evans 
  897. Systematic Program Development 
  898. evs@larch.lcs.mit.edu 
  899.  
  900.  
  901. ΓòÉΓòÉΓòÉ 1.5. LCLint User's Guide - 5. Memory Management ΓòÉΓòÉΓòÉ
  902.  
  903.  
  904.  
  905.  5. Memory Management 
  906.  
  907. About half the bugs in typical C programs can be attributed to memory 
  908. management problems.  Memory management bugs are notoriously difficult to 
  909. detect through traditional techniques.  Often, the symptom of the bug is far 
  910. removed from its actual source.  Memory management bug often only appear 
  911. sporadically and some bugs may only be apparent when compiler optimizations are 
  912. turned on or the code is compiled on a different platform.  Run-time tools 
  913. offer some help, but are cumbersome to use and limited to detecting errors that 
  914. occur when test cases are run.  By detecting these errors statically, we can be 
  915. confident that certain types of errors will never occur and provide verified 
  916. documentation on the memory management behavior of a program. 
  917.  
  918. LCLint can detect many memory management errors at compile time including: 
  919.  
  920.      using storage that may have been freed (Section 5.2) 
  921.  
  922.  
  923.      failing to deallocate memory (Section 5.2) 
  924.  
  925.  
  926.      returning a pointer to stack-allocated storage (Section 5.2.6) 
  927.  
  928.  
  929.      undocumented or dangerous aliasing or storage sharing (Section 6) 
  930.  
  931.  
  932.      passing or returning storage that is not completely defined (Section 7.1) 
  933.  
  934.  
  935.      dereferencing a null pointers (Section 7.2) 
  936.  
  937.  
  938.   Most of these checks rely heavily on annotations added to programs to 
  939.  document assumptions related to memory management and pointer values.  By 
  940.  documenting these assumptions for function interfaces, variables, type 
  941.  definitions and structure fields, memory management bugs can be detected at 
  942.  their source -- where an assumption is violated.  In addition, precise 
  943.  documentation about memory management decisions makes its easier to change 
  944.  code. 
  945.  
  946.   5.1 Storage Model[10] 
  947.  
  948.   Yea, from the table of my memory I'll wipe away all trivial fond records, all 
  949.  saws of books, all forms, all pressures past, that youth and observation 
  950.  copied there. 
  951.  - Hamlet prefers garbage collection (Shakespeare, Hamlet. Act I, Scene v) 
  952.  This section describes execution-time concepts for describing the state of 
  953.  storage more precisely than can be done using standard C terminology.  Certain 
  954.  uses of storage are likely to indicate program bugs, and are reported as 
  955.  anomalies. 
  956.  
  957.  LCL assumes a CLU-like object storage model.[11]  An object is a typed region 
  958.  of storage.  Some objects use a fixed amount of storage that is allocated and 
  959.  deallocated automatically by the compiler. 
  960.  
  961.  Other objects use dynamic storage that must be managed by the program. 
  962.  
  963.  Storage is undefined if it has not been assigned a value, and defined after it 
  964.  has been assigned a value.  An object is completely defined if all storage 
  965.  that may be reached from it is defined.  What storage is reachable from an 
  966.  object depends on the type and value of the object.  For example, if p is a 
  967.  pointer to a structure, p is completely defined if the value of p is NULL, or 
  968.  if every field of the structure p points to is completely defined. 
  969.  
  970.  When an expression is used as the left side of an assignment expression we say 
  971.  it is used as an lvalue.  Its location in memory is used, but not its value. 
  972.  Undefined storage may be used as an lvalue since only its location is needed. 
  973.  When storage is used in any other way, such as on the right side of an 
  974.  assignment, as an operand to a primitive operator (including the indirection 
  975.  operator, *),[12] or as a 
  976.  
  977.  function parameter, we say it is used as an rvalue.  It is an anomaly to use 
  978.  undefined storage as an rvalue. 
  979.  
  980.  A pointer is a typed memory address.  A pointer is either live or dead.  A 
  981.  live pointer is either NULL or an address within allocated storage.  A pointer 
  982.  that points to an object is an object pointer.  A pointer that points inside 
  983.  an object (e.g., to the third element of an allocated block) is an offset 
  984.  pointer.  A pointer that points to allocated storage that is not defined is an 
  985.  allocated pointer.  The result of dereferencing an allocated pointer is 
  986.  undefined storage.  Hence, it is an anomaly to use it as an rvalue.  A dead 
  987.  (or "dangling") pointer does not point to allocated storage.  A pointer 
  988.  becomes dead if the storage it points to is deallocated (e.g., the pointer is 
  989.  passed to the free library function.)  It is an anomaly to use a dead pointer 
  990.  as an rvalue. 
  991.  
  992.  There is a special object null corresponding to the NULL pointer in a C 
  993.  program.  A pointer that may have the value NULL is a possibly-null pointer. 
  994.  It is an anomaly to use a possibly-null pointer where a non-null pointer is 
  995.  expected (e.g., certain function arguments or the indirection operator). 
  996.  
  997.   5.2 Deallocation Errors 
  998.  
  999.  There are two kinds of deallocation errors with which we are concerned: 
  1000.  deallocating storage when there are other live references to the same storage, 
  1001.  or failing to deallocate storage before the last  reference to it is lost.  To 
  1002.  handle these deallocation errors, we introduce a concept of an obligation to 
  1003.  release storage.  Every time storage is allocated, it creates an obligation to 
  1004.  release the storage.  This obligation is attached to the reference to which 
  1005.  the storage is assigned.[13]  Before the scope of the reference is exited or 
  1006.  it is assigned to a new value, the storage to which it points must be 
  1007.  released.  Annotations can be used to indicate that this obligation is 
  1008.  transferred through a return value, function parameter or assignment to an 
  1009.  external reference. 
  1010.  
  1011.   5.2.1 Unshared References 
  1012.  
  1013.  `Tis in my memory lock'd, and you yourself shall keep the key of it. 
  1014.  - Ophelia prefers explicit deallocation (Hamlet.  Act I, Scene iii)  The only 
  1015.  annotation is used to indicate a reference is the only pointer to the object 
  1016.  it points to.  We can view the reference as having an obligation to release 
  1017.  this storage.  This obligation is satisfied by transferring it to some other 
  1018.  reference in one of three ways: 
  1019.  
  1020.      pass it as an actual parameter corresponding to a formal parameter 
  1021.       declared with an only annotation 
  1022.      assign it to an external reference declared with an only annotation 
  1023.      return it as a result declared with an only annotation 
  1024.   After the release obligation is transferred, the original reference is a dead 
  1025.  pointer and the storage it points to may not be used. 
  1026.  
  1027.  All obligations to release storage stem from primitive allocation routines 
  1028.  (e.g., malloc), and are ultimately satisfied by calls to free.  The standard 
  1029.  library declared the primitive allocation and deallocation routines. 
  1030.  
  1031.  The basic memory allocator, malloc, is declared:[14] 
  1032.  
  1033.   /*@only@*/ void *malloc (size_t size);
  1034.  It returns an object that is referenced only by the function return value. 
  1035.  
  1036.  The deallocator, free, is declared:[15] 
  1037.  
  1038.   void free (/*@only@*/ void *ptr);
  1039.  
  1040.  The parameter to free must reference an unshared object.  Since the parameter 
  1041.  is declared using only, the caller may not use the referenced object after the 
  1042.  call, and may not pass in a reference to a shared object.  There is nothing 
  1043.  special about malloc and free -- their behavior can be described entirely in 
  1044.  terms of the provided annotations. 
  1045.  
  1046.  Figure 6.  Deallocation errors. 
  1047.  
  1048.  
  1049.  
  1050.   5.2.2 Temporary Parameters 
  1051.  
  1052.  The temp annotation is used to declare a function parameter that is used 
  1053.  temporarily by the function.  An error is reported if the function releases 
  1054.  the storage associated with a temp formal parameter or creates new aliases it 
  1055.  that are visible after the function returns.  Any storage may be passed as a 
  1056.  temp parameter, and it satisfies its original memory constraints after the 
  1057.  function returns. 
  1058.  
  1059.   5.2.3 Owned and Dependent References 
  1060.  
  1061.  In real programs it is sometimes necessary to have storage that is shared 
  1062.  between several possibly references.  The owned and dependent annotations 
  1063.  provide a more flexible way of managing storage, at the cost of less checking. 
  1064.  The owned annotation denotes a reference with an obligation to release 
  1065.  storage. Unlike only, however, other external references marked with dependent 
  1066.  annotations may share this object.  It is up to the programmer to ensure that 
  1067.  the lifetime of a dependent reference is contained within the lifetime of the 
  1068.  corresponding owned reference. 
  1069.  
  1070.   5.2.4 Kept Parameters 
  1071.  
  1072.  The keep annotation is similar to only, except the caller may use the 
  1073.  reference after the call.  The called function must assign the keep parameter 
  1074.  to an only reference, or pass it as a keep parameter to another function.  It 
  1075.  is up to the programmer to make sure that the calling function does not use 
  1076.  this reference after it is released.  The keep annotation is useful for adding 
  1077.  an object to a collection (e.g., a symbol table), where it is known that it 
  1078.  will not be deallocated until the collection is. 
  1079.  
  1080.   5.2.5 Shared References 
  1081.  
  1082.  If LCLint is used to check a program designed to be used in a 
  1083.  garbage-collected environment, there may be storage that is shared by one or 
  1084.  more references and never explicitly released.  The shared annotation declares 
  1085.  storage that may be shared arbitrarily, but never released. 
  1086.  
  1087.   5.2.6 Stack References 
  1088.  
  1089.  Local variables that are not allocated dynamically are store on a call stack. 
  1090.  When a function returns, its stack frame is deallocated, destroying the 
  1091.  storage associated with the function's local variables.  A memory error occurs 
  1092.  if a pointer into this storage is live after the function returns.  LCLint 
  1093.  detects errors involving stack references exported from a function through 
  1094.  return values or assignments to references reachable from global variables or 
  1095.  actual parameters.  No annotations are needed to detect stack reference 
  1096.  errors, since it is clear from a declaration if storage is allocated on the 
  1097.  function stack. 
  1098.  
  1099.  Figure 7.  Stack references. 
  1100.  
  1101.  
  1102.  
  1103.   5.2.7 Inner Storage 
  1104.  
  1105.  An annotation always applies to the outermost level of storage.  For example, 
  1106.  
  1107.   /*@only@*/ int **x;
  1108.  declares x as an unshared pointer to a pointer to an int.  The only annotation 
  1109.  applies to x, but not to *x.  To apply annotations to inner storage a type 
  1110.  definition may be used: 
  1111.  
  1112.     typedef /*@only@*/ int *oip;
  1113.     /*@only@*/ oip *x;
  1114.  Now, x is an only pointer to an oip, which is an only pointer to an int. 
  1115.  
  1116.  When annotations are use in type definitions, they may be overridden in 
  1117.  instance declarations.  For example, 
  1118.  
  1119.   /*@dependent@*/ oip x;
  1120.  makes x a dependent pointer to an int. 
  1121.  
  1122.   5.3 Implicit Memory Annotations 
  1123.  
  1124.  Since it is important that LCLint can check unannotated programs effectively, 
  1125.  the meaning of declarations with no memory annotations is chosen to minimize 
  1126.  the number of annotations needed to get useful checking on an unannotated 
  1127.  program. 
  1128.  
  1129.  An implicit memory management annotation may be assumed for declarations with 
  1130.  no explicit memory management annotation.  Implicit annotations are checked 
  1131.  identically to the corresponding explicit annotation, except error messages 
  1132.  indicate that they result from an implicit annotation. 
  1133.  
  1134.  Unannotated function parameters are assumed to be temp.  This means if memory 
  1135.  checking is turned on for an unannotated program, all functions that release 
  1136.  storage referenced by a parameter or assign a global variable to alias the 
  1137.  storage will produce error messages.  (Controlled by paramimptemp.) 
  1138.  
  1139.  Unannotated return values, structure fields and global variables are assumed 
  1140.  to be only.  With implicit annotations (on by default), turning on memory 
  1141.  checking for an unannotated program will produce errors for any function that 
  1142.  does not return unshared storage or assignment of shared storage to a global 
  1143.  variable or structure field.[16]  (Controlled by retimponly, structimponly and 
  1144.  globimponly .  The codeimponly flag sets all of the implicit only flags.) 
  1145.  
  1146.  Figure 8.  Implicit annotations 
  1147.  
  1148.  
  1149.  
  1150.   5.4 Reference Counting 
  1151.  
  1152.  Another approach to memory management is to add a field to a type to 
  1153.  explicitly keep track of the number of references to that storage.  Every time 
  1154.  a reference is added or lost the reference count is adjusted accordingly;  if 
  1155.  it would become zero, the storage is released.  Reference counting it 
  1156.  difficult to do without automatic checking since it is easy to forget to 
  1157.  increment or decrement the reference count, and exceedingly difficult to track 
  1158.  down these errors. 
  1159.  
  1160.  LCLint supports reference counting by using annotations to constrain the use 
  1161.  of reference counted storage in a manner similar to other memory management 
  1162.  annotations. 
  1163.  
  1164.  A reference counted type is declared using the refcounted annotation.  Only 
  1165.  pointer to struct types may be declared as reference counted, since reference 
  1166.  counted storage must have a field to count the references.  One field in the 
  1167.  structure (or integral type) is preceded by the refs annotation to indicate 
  1168.  that the value of this field is the number of live references to the 
  1169.  structure. 
  1170.  
  1171.  For example (in rstring.h), 
  1172.  
  1173.        typedef /*@abstract@*/ /*@refcounted@*/ struct {
  1174.             /*@refs@*/ int refs;
  1175.           char *contents;
  1176.         } *rstring;
  1177.  declares rstring as an abstract, reference-counted type.  The refs field 
  1178.  counts the number of references and the contents field holds the contents of a 
  1179.  string. 
  1180.  
  1181.  All functions that return refcounted storage must increase the reference count 
  1182.  before returning.  LCLint cannot determine if the reference count was 
  1183.  increased, so any function that directly returns a reference to refcounted 
  1184.  storage will produce an error.  This is avoided, by using a function to return 
  1185.  a new reference (e.g., rstring_ref in Figure 9). 
  1186.  
  1187.  A reference counted type may be passed as a temp or dependent parameter.  It 
  1188.  may not be passed as an only parameter.  Instead, the killref annotation is 
  1189.  used to denote a parameter whose reference is eliminated by the function call. 
  1190.  Like only parameters, an actual parameter corresponding to a killref formal 
  1191.  parameter may not be used in the calling function after the call.  LCLint 
  1192.  checks that the implementation of a function releases all killref parameters, 
  1193.  either by passing them as killref parameters, or assigning or returning them 
  1194.  without increasing the reference count. 
  1195.  
  1196.  Figure 9.  Reference counting. 
  1197.  
  1198.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1199.  
  1200.   David Evans 
  1201.  Systematic Program Development 
  1202.  evs@larch.lcs.mit.edu 
  1203.  
  1204.  
  1205. ΓòÉΓòÉΓòÉ 1.6. LCLint User's Guide - 6. Sharing ΓòÉΓòÉΓòÉ
  1206.  
  1207.  
  1208.  
  1209.  6. Sharing 
  1210.  
  1211.  Errors involving unexpected sharing of storage can cause serious problems. 
  1212. Undocumented sharing may lead to unpredictable modifications, and some library 
  1213. calls (e.g., strcpy) have undefined behavior if parameters share storage. 
  1214. Another class of sharing errors occurs when clients of an abstract type may 
  1215. obtain a reference to mutable storage that is part of the abstract 
  1216. representation.  This exposes the representation of the abstract type, since 
  1217. clients may modify an instance of the abstract type indirectly through this 
  1218. shared storage. 
  1219.  
  1220.  
  1221.  
  1222.  6.1 Aliasing 
  1223.  
  1224. LCLint detects errors involving dangerous aliasing of parameters.  Some of 
  1225. these errors are already detected through the standard memory annotations 
  1226. (e.g., only parameters may not be aliases.)  Two additional annotations are 
  1227. provided for constraining aliasing of parameters and return values. 
  1228.  
  1229.  6.1.1 Unique Parameters 
  1230.  
  1231. The unique annotation denotes a parameter that may not be aliased by any other 
  1232. storage reachable from the function implementation -- that is, any storage 
  1233. reachable through the other parameters or global variables used by the 
  1234. function.  The unique annotation places similar constraints on function 
  1235. parameters as the only annotation, but it does not transfer the obligation to 
  1236. release storage. 
  1237.  
  1238. LCLint will report an error if a unique parameter may be aliased by another 
  1239. parameter or global variable. 
  1240.  
  1241.  Figure 10.  Unique parameters. 
  1242.  
  1243.  6.1.2 Returned Parameters 
  1244.  
  1245. LCLint reports an error if a function returns a reference to storage reachable 
  1246. from one of its parameters (if retalias is on) since this may introduce 
  1247. unexpected aliases in the body of the calling function when the result is 
  1248. assigned. 
  1249.  
  1250. The returned annotation denotes a parameter that may be aliased by the return 
  1251. value.  LCLint checks the call assuming the result may be an alias to the 
  1252. returned parameter. Figure 11 shows an example use of a returned annotation. 
  1253.  
  1254.  6.2 Exposure 
  1255.  
  1256. LCLint detects places where the representation of an abstract type is exposed. 
  1257. This occurs if a client has a pointer to storage that is part of the 
  1258. representation of an instance of the abstract type.  The client can then modify 
  1259. or examine the storage this points to, and manipulate the value of the abstract 
  1260. type instance without using its operations. 
  1261.  
  1262. There are three ways a representation may be exposed: 
  1263.  
  1264.    1. Returning (or assigning to a global variable) an object that includes a 
  1265.       pointer to a mutable component of an abstract type representation. 
  1266.       (Controlled by retexpose). 
  1267.    2. Assigning a mutable component of an abstract object to storage reachable 
  1268.       from an actual parameter or a global variable that may be used after the 
  1269.       call. This means the client may manipulate the abstract object using the 
  1270.       actual parameter after the call.  Note that if the corresponding formal 
  1271.       parameter is declared only, the caller may not use the actual parameter 
  1272.       after the call so the representation is not exposed.  (Controlled by 
  1273.       assignexpose). 
  1274.    3. Casting mutable storage to or from an abstract type.  (Controlled by 
  1275.       castexpose). 
  1276.   Annotations may be used to allow exposed storage to be returned safely by 
  1277.  restricting how the caller may use the returned storage. 
  1278.  
  1279.   6.2.1 Read-Only Storage 
  1280.  
  1281.  It is often useful for a function to return a pointer to internal storage (or 
  1282.  a instance of a mutable abstract type) that is intended only as an observer. 
  1283.  The caller may use the result, but should not modify the storage it points to. 
  1284.  For example, consider an naΓòºve implementation of the employee_getName 
  1285.  operation for the abstract employee type: 
  1286.  
  1287.      typedef /*@abstract@*/ struct {
  1288.         char *name;
  1289.         int id;
  1290.      } *employee;
  1291.      ...
  1292.      char *employee_getName (employee e) { return e->name; }
  1293.  LCLint produces a message to indicate that the return value exposes the 
  1294.  representation.  One solution would be to return a fresh copy of e->name. This 
  1295.  is expensive, though, especially if we expect employee_getName is used mainly 
  1296.  just to get a string for searching or printing.  Instead, we could change the 
  1297.  declaration of employee_getName to: 
  1298.  
  1299.   extern /*@observer@*/ char *employee_getName (employee e);
  1300.  Now, the original implementation is correct.  The declaration indicates that 
  1301.  the result may not be modified by the caller, so it is acceptable to return 
  1302.  shared storage.[17]  LCLint checks that the return value is not modified by 
  1303.  the caller.  An error is reported if observer storage is modified directly, 
  1304.  passed as a function parameter that may be modified, assigned to a global 
  1305.  variable or reference derivable from a global variable that is not declared 
  1306.  with an observer annotation, or returned as a function result or a reference 
  1307.  derivable from the function result that is not annotation with an observer 
  1308.  annotation. 
  1309.  
  1310.  String Literals 
  1311.  
  1312.  A program that attempts to modify a string literal has undefined behavior 
  1313.  [ANSI, Section 3.1.4]. This is not enforced by most C compilers, and can lead 
  1314.  to particularly pernicious bugs that only appear when optimizations are turned 
  1315.  on and the compiler attempts to minimize storage for string literals.  LCLint 
  1316.  can be used to check that string literals are not modified, by treating them 
  1317.  as observer storage.  If readonlystrings is on (default in standard mode), 
  1318.  LCLint will report an error if a string literal is modified. 
  1319.  
  1320.   6.2.2 Exposed Storage 
  1321.  
  1322.  Sometimes it is necessary to expose the representation of an abstract type. 
  1323.  This may be evidence of a design flaw, but in some cases is justified for 
  1324.  efficiency reasons.  The exposed annotation denotes storage that is exposed. 
  1325.  It may be used on a return value for results that reference storage internal 
  1326.  to an abstract representation, on a parameter value to indicate a parameter 
  1327.  that may be assigned directly to part of an abstract representation,[18] or on 
  1328.  a field of an abstract representation to indicate that external references to 
  1329.  the storage may exist. An error is reported if exposed storage is released, 
  1330.  but unlike an observer, no error is reported if it is modified. 
  1331.  
  1332.  Figure 12 shows examples of exposure problems detected by LCLint. 
  1333.  
  1334.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1335.  
  1336.   David Evans 
  1337.  Systematic Program Development 
  1338.  evs@larch.lcs.mit.edu 
  1339.  
  1340.  
  1341. ΓòÉΓòÉΓòÉ 1.7. LCLint User's Guide - 7. Value Constraints ΓòÉΓòÉΓòÉ
  1342.  
  1343.  
  1344.  
  1345.  7. Value Constraints 
  1346.  
  1347. LCLint can be used to constrain values of parameters, function results, global 
  1348. variables, and derived storage such as structure fields.  These constraints are 
  1349. checked at interface points -- where a function is called or returns. Section 
  1350. 7.1 describes how to constrain parameters, return values and structures to 
  1351. detect use before definition errors.  A similar approach is used for 
  1352. restricting the use of possibly null pointers in Section 7.2.  To do both well, 
  1353. and avoid spurious errors, information about when and if a function returns if 
  1354. useful.  Annotations for documenting execution control are described in Section 
  1355. 7.3. 
  1356.  
  1357.  
  1358.  
  1359.  7.1 Use Before Definition 
  1360.  
  1361. Like many static checkers, LCLint detects instances where the value of a 
  1362. location is used before it is defined.  This analysis is done at the procedural 
  1363. level.  If there is a path through the procedure that 
  1364.  
  1365. uses a local variable before it is defined, a use before definition error is 
  1366. reported.  Use before definition checking is controlled by the usedef flag. 
  1367.  
  1368. LCLint can do more checking than standard checkers though, because the 
  1369. annotations can be used to describe what storage must be defined and what 
  1370. storage may be undefined at interface points. Unannotated references are 
  1371. expected to be completely defined at interface points.  This means all storage 
  1372. reachable from a global variable, parameter to a function, or function return 
  1373. value is defined before and after a function call. 
  1374.  
  1375.  7.1.1 Undefined Parameters 
  1376.  
  1377. Sometimes, function parameters or return values are expected to reference 
  1378. undefined or partially defined storage.  For example, a pointer parameter may 
  1379. be intended only as an address to store a result, or a memory allocator may 
  1380. return allocated but undefined storage.  The out annotation denotes a pointer 
  1381. to storage that may be undefined. 
  1382.  
  1383. LCLint does not report an error when a pointer to allocated but undefined 
  1384. storage is passed as an out parameter.  Within the body of a function, LCLint 
  1385. will assume an out parameter is allocated but not necessarily bound to a value, 
  1386. so an error is reported if its value is used before it is defined. 
  1387.  
  1388. LCLint reports an error if storage reachable by the caller after the call is 
  1389. not defined when the function returns.  This can be suppressed by -mustdefine. 
  1390. When checking a call, an actual parameter corresponding to an out parameter is 
  1391. assumed to be completely defined after the call returns. 
  1392.  
  1393. When checking unannotated programs, many spurious use before definition errors 
  1394. may be reported  If impouts is on, no error is reported when an 
  1395. incompletely-defined parameter is passed to a formal parameter with no 
  1396. definition annotation, and the actual parameter is assumed to be defined after 
  1397. the call.  The /*@in@*/ annotation can be used to denote a parameter that must 
  1398. be completely defined, even if impouts is on.  If impouts is off, there is an 
  1399. implicit in annotation on every parameter with no definition annotation. 
  1400.  
  1401. Figure 13.  Use before definition. 
  1402.  
  1403.  7.1.2 Relaxing Checking 
  1404.  
  1405. The reldef annotation relaxes definition checking for a particular declaration. 
  1406. Storage declared with a reldef annotation is assumed to be defined when it is 
  1407. used, but no error is reported if it is not defined before it is returned or 
  1408. passed as a parameter. 
  1409.  
  1410. It is up to the programmer to check reldef fields are used correctly.  They 
  1411. should be avoided in most cases, but may be useful for fields of structures 
  1412. that may or may not be defined depending on other constraints. 
  1413.  
  1414.  7.1.3 Partially Defined Structures 
  1415.  
  1416. The partial annotated can be used to relax checking of structure fields.  A 
  1417. structure with undefined fields may be passed as a partial parameter or 
  1418. returned as a partial result.  Inside a function body, no error is reported 
  1419. when the field of a partial structure is used.  After a call, all fields of a 
  1420. structure that is passed as a partial parameter are assumed to be completely 
  1421. defined. 
  1422.  
  1423.  
  1424.  
  1425.  7.1.4 Global Variables 
  1426.  
  1427. Special annotations can be used in the globals list of a function declaration 
  1428. (Section 4.2) to describe the states of global variables before and after the 
  1429. call. 
  1430.  
  1431. If a global is preceded by undef, it is assumed to be undefined before the 
  1432. call. Thus, no error is reported if the global is not defined when the function 
  1433. is called, but an error is reported if the global is used in the function body 
  1434. before it is defined. 
  1435.  
  1436. The killed annotation denotes a global variable that may be undefined when the 
  1437. call returns.  For globals that contain dynamically allocated storage, a killed 
  1438. global variable is similar to an only parameter (Section 5.2).  An error is 
  1439. reported if it contains the only reference to storage that is not released 
  1440. before the call returns. 
  1441.  
  1442. Figure 14.  Annotated globals lists. 
  1443.  
  1444.  
  1445.  
  1446.  7.2 Null Pointers 
  1447.  
  1448. A common cause of program failures is when a null pointer is dereferenced. 
  1449. LCLint detects these errors by distinguishing possibly NULL pointers at 
  1450. interface boundaries. 
  1451.  
  1452. The null annotation is used to indicate that a pointer value may be NULL.  A 
  1453. pointer declared with no null annotation, may not be NULL.  If null checking is 
  1454. turned on (controlled by null), LCLint will report an error when a possibly 
  1455. null pointer is passed as a parameter, returned as a result, or assigned to an 
  1456. external reference with no null qualifier. 
  1457.  
  1458. If a pointer is declared with the null annotation, the code must check that it 
  1459. is not NULL on all paths leading to the a dereference of the pointer (or the 
  1460. pointer being returned or passed as a value with no null annotation). 
  1461. Dereferences of possibly null pointers may be protected by conditional 
  1462. statements or assertions (to see how assert is declared see Section 7.3) that 
  1463. check the pointer is not NULL. 
  1464.  
  1465. Consider two implementations of firstChar in Figure 15. For firstChar1, LCLint 
  1466. reports an error since the pointer that is dereferenced is declared with a null 
  1467. annotation.  For firstChar2, no error is reported since the true branch of the 
  1468. s == NULL if statement returns, so the dereference of s is only reached if s is 
  1469. not NULL. 
  1470.  
  1471.  
  1472.  
  1473.  7.2.1 Predicate Functions 
  1474.  
  1475. Another way to protect null dereference, is to declare a function using 
  1476. falsenull or truenull and call the function in a conditional statement before 
  1477. the null-annotated pointer is dereferenced.  The falsenull and truenull 
  1478. annotations may only be used on return values for functions that return a 
  1479. boolean[19] result and whose first argument is a possibly null pointer. 
  1480.  
  1481. A function is annotated with truenull is assumed to return TRUE if its first 
  1482. parameter is NULL and FALSE otherwise. For example, if isNull is declared as, 
  1483.  
  1484.    /*@truenull@*/ bool isNull (/*@null@*/ char *x);
  1485. we could write firstChar2: 
  1486.  
  1487.    char firstChar2 (/*@null@*/ char *s)
  1488.    {
  1489.       if (isNull (s)) return '\0';
  1490.       return *s;
  1491.    }
  1492. No error is reported since the dereference of s is only reached if isNull(s) is 
  1493. false, and since isNull is declared with the truenull annotation this means s 
  1494. must not be null. 
  1495.  
  1496. The falsenull annotation is not quite the opposite of truenull.  If a function 
  1497. declared with falsenull returns TRUE, it means its parameter is not NULL.  If 
  1498. it returns FALSE, the parameter may or may not be NULL. 
  1499.  
  1500. For example, we could define isNonEmpty to return TRUE if its parameter is not 
  1501. NULL and has least one character before the NUL terminator: 
  1502.  
  1503.    /*@falsenull@*/ bool isNonEmpty (/*@null@*/ char *x)
  1504.    {
  1505.      return (x != NULL && *x != `\0');
  1506.    }
  1507. LCLint does not check that the implementation of a function declared with 
  1508. falsenull or truenull is consistent with its annotation, but assumes the 
  1509. annotation is correct when code that calls the function is checked. 
  1510.  
  1511.  7.2.2 Overriding Null Types 
  1512.  
  1513. The null annotation may be used in a type definition to indicate that all 
  1514. instances of the type may be NULL.  For declarations of a type declared using 
  1515. null, the null annotation in the type definition may be overridden with 
  1516. notnull. This is particularly useful for parameters to hidden static operations 
  1517. of abstract types where the null test has already been done before the function 
  1518. is called, or function results of the type which are never NULL.  For an 
  1519. abstract type, notnull may not be used for parameters to external functions, 
  1520. since clients should not be aware of when the concrete representation may by 
  1521. NULL.  Parameters to static functions in the implementation module, however, 
  1522. may be declared using notnull, since they may only be called from places where 
  1523. the representation is accessible.  Return values for static or external 
  1524. functions may be declared using notnull. 
  1525.  
  1526. Figure 16.  Using notnull. 
  1527.  
  1528.  
  1529.  
  1530.  7.2.3 Relaxing Null Checking 
  1531.  
  1532. An additional annotation, relnull may be used to relax null checking (relnull 
  1533. is analogous to reldef for definition checking).  No error is reported when a 
  1534. relnull value is dereferenced, or when a possibly null value is assigned to an 
  1535. identifier declared using relnull. 
  1536.  
  1537. This is generally used for structure fields that may or may not be null 
  1538. depending on some other constraint.  LCLint does not report and error when NULL 
  1539. is assigned to a relnull reference, or when a relnull reference is 
  1540. dereferenced.  It is up to the programmer to ensure that this constraint is 
  1541. satisfied before the pointer is dereferenced. 
  1542.  
  1543.  7.3 Execution 
  1544.  
  1545. To detect certain errors and avoid spurious errors, it is important to know 
  1546. something about the control flow behavior of called functions. Without 
  1547. additional information, LCLint assumes that all functions eventually return and 
  1548. execution continues normally at the call site. 
  1549.  
  1550. The exits annotation is used to denote a function that never returns.  For 
  1551. example, 
  1552.  
  1553. extern /*@exits@*/ void fatalerror (/*@observer@*/ char *s);
  1554. declares fatalerror to never return.  This allows LCLint to correctly analyze 
  1555. code like, 
  1556.  
  1557.    if (x == NULL) fatalerror ("Yikes!");
  1558.    *x = 3;
  1559. Other functions may exit, but sometimes (or usually) return normally.  The 
  1560. mayexit annotation denotes a function that may or may not return.  This doesn't 
  1561. help checking much, since LCLint must assume that a function declared with 
  1562. mayexit returns normally when checking the code. 
  1563.  
  1564. To be more precise, the trueexit and falseexit annotations may be used Similar 
  1565. to truenull and falsenull (see Section 7.2.1), trueexit and falseexit mean that 
  1566. a function always exits if the value of its first argument is TRUE or FALSE 
  1567. respectively.  They may be used only on functions whose first argument has a 
  1568. boolean type. 
  1569.  
  1570. A function declared with trueexit must exit if the value of its argument is 
  1571. TRUE, and a function declared with falseexit must exit if the value of its 
  1572. argument is FALSE.  For example, the standard library declares assert as[20]: 
  1573.  
  1574. /*@falseexit@*/ void assert (/*@sef@*/ bool /*@alt int@*/ pred);
  1575. This way, code like, 
  1576.  
  1577.    assert (x != NULL);
  1578.  
  1579.    *x = 3;
  1580. is checked correctly, since the falseexit annotation on assert means the 
  1581. deference of x is not reached is x != NULL is false. 
  1582.  
  1583. 7.4 Special Clauses 
  1584.  
  1585.  Sometimes it is necessary to specify function interfaces at a lower level than 
  1586. is possible with the standard annotations.  For example, if a function defines 
  1587. some fields of a returned structure but does not define all the fields.  The 
  1588. /*@special@*/ annotation is used to mark a parameter, global variable, or 
  1589. return value that is described using special clauses.  The usual implicit 
  1590. definition rules do not apply to a special declaration. 
  1591.  
  1592. Special clauses may be used to constrain the state of a parameter or return 
  1593. value before or after a call.  One or more special clauses may appear in a 
  1594. function declaration, before the modifies or globals clauses.  Special clauses 
  1595. may be listed in any order, but the same special clause should not be used more 
  1596. than once.  Parameters used in special clauses must be annotated with 
  1597. /*@special@*/ in the function header.  In a special clause list, result is used 
  1598. to refer to the return value of the function.  If result appears in a special 
  1599. clause, the function return value must be annotated with /*@special@*/. 
  1600.  
  1601. The following special clauses are used to describe the definition state or 
  1602. parameters before and after the function is called and the return value after 
  1603. the function returns: 
  1604.  
  1605.  /*@uses references@*/ 
  1606.  
  1607. References in the uses clause must be completely defined before the function is 
  1608. called.  They are assumed to be defined at function entrance when the function 
  1609. is checked.  /*@sets references@*/ 
  1610.  
  1611. References in the sets clause must be allocated before the function is called. 
  1612. They are completely defined after the function returns. When the function is 
  1613. checked, they are assumed to be allocated at function entrance and an error is 
  1614. reported if there is a path on which they are not defined before the function 
  1615. returns.  /*@defines references@*/ 
  1616.  
  1617. References in the defines clause must not refer to unshared, allocated storage 
  1618. before the function is called.  They are completely defined after the function 
  1619. returns. When the function is checked, they are assumed to be undefined at 
  1620. function entrance and an error is reported if there is a path on which they are 
  1621. not defined before the function returns.  /*@allocates references@*/ 
  1622.  
  1623. References in the allocates clause must not refer to unshared, allocated 
  1624. storage before the function is called.  They are allocated but not necessarily 
  1625. defined after the function returns. When the function is checked, they are 
  1626. assumed to be undefined at function entrance and an error is reported if there 
  1627. is a path on which they are not allocated before the function returns. 
  1628. /*@releases references@*/ 
  1629.  
  1630. References in the releases clause are deallocated by the function.  They must 
  1631. correspond to storage which could be passed as an only parameter before the 
  1632. function is called, and are dead pointers after the function returns.  When the 
  1633. function is checked, they are assumed to be allocated at function entrance and 
  1634. an error is reported if they refer to live, allocated storage at any return 
  1635. point. 
  1636.  
  1637.  Additional generic special clauses can be used to describe other aspects of 
  1638. the state of inner storage before or after a call.  Generic special clauses 
  1639. have the form state:constraint.  The state is either pre (before the function 
  1640. is called), or post (after the function is called).  The constraint is similar 
  1641. to an annotation.  The following constraints are supported: 
  1642.  
  1643.  
  1644.  
  1645. Aliasing Annotations 
  1646.  
  1647.  pre:only, post:only 
  1648. pre:shared, post:shared 
  1649. pre:owned, post:owned 
  1650. pre:dependent, post:dependent 
  1651.  
  1652. References refer to only, shared, owned or dependent storage before (pre) or 
  1653. after (post) the call. 
  1654.  
  1655. Exposure Annotations 
  1656.  
  1657.  pre:observer, post:observer 
  1658. pre:exposed, post:exposed 
  1659.  
  1660.  References refer to observer or exposed storage before (pre) or after (post) 
  1661. the call. 
  1662.  
  1663. Null State Annotations 
  1664.  
  1665.  pre:isnull, post:isnull 
  1666.  
  1667. References have the value NULL before (pre) or after (post) the call. Note, 
  1668. this is not the same name or meaning as the null annotation (which means the 
  1669. value may be NULL.)  pre:notnull, post:notnull 
  1670.  
  1671. References do not have the value NULL before (pre) or after (post) the call. 
  1672. Some examples of special clauses are shown in Figure 17. The defines clause for 
  1673. record_new indicates that the id field of the structure pointed to by the 
  1674. result is defined, but the name field is not.  So, record_create needs to call 
  1675. record_setName to define the name field.  Similarly, the releases clause for 
  1676. record_clearName indicates that no storage is associated with the name field of 
  1677. its parameter after the return, so no failure to deallocate storage message is 
  1678. produced for the call to free in record_free. 
  1679.  
  1680. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1681.  
  1682.  David Evans 
  1683. Systematic Program Development 
  1684. evs@larch.lcs.mit.edu 
  1685.  
  1686.  
  1687. ΓòÉΓòÉΓòÉ 1.8. LCLint User's Guide - 8. Macros ΓòÉΓòÉΓòÉ
  1688.  
  1689.  
  1690.  
  1691.  8. Macros 
  1692.  
  1693. Macros are commonly used in C programs to implement constants or to mimic 
  1694. functions without the overhead of a function call.  Macros that are used to 
  1695. implement functions are a persistent source of bugs in C programs, since they 
  1696. may not behave like the intended function when they are invoked with certain 
  1697. parameters or used in certain syntactic contexts. 
  1698.  
  1699. LCLint eliminates most of the potential problems by detecting macros with 
  1700. dangerous implementations and dangerous macro invocations.  Whether or not a 
  1701. macro definition is checked or expanded normally depends on flag settings and 
  1702. control comments (see Section 8.3).  Stylized macros can also be used to define 
  1703. control structures for iterating through many values (see Section 8.4). 
  1704.  
  1705.  8.1 Constant Macros 
  1706.  
  1707. Macros may be used to implement constants.  To get type-checking for constant 
  1708. macros, use the  constant syntactic comment: 
  1709.  
  1710. /*@constant null char *mstring_undefined@*/
  1711. Declared constants are not expanded and are checked according to the 
  1712. declaration.  A constant with a null annotation may be used as only storage. 
  1713.  
  1714.  8.2 Function-like Macros 
  1715.  
  1716. Using macros to imitate functions is notoriously dangerous.  Consider this 
  1717. broken macro for squaring a number: 
  1718.  
  1719. # define square(x) x * x
  1720. This works fine for a simple invocation like square(i).  It behaves 
  1721. unexpectedly, though, if it is invoked with a parameter that has a side effect. 
  1722.  
  1723. For example, square(i++) expands to i++ * i++.  Not only does this give the 
  1724. incorrect result, it has undefined behavior since the order in which the 
  1725. operands are evaluated is not defined.  (See Section 10.1 for more information 
  1726. on how expressions exhibiting undefined evaluation order behavior are detected 
  1727. by LCLint.)  To correct the problem we either need to rewrite the macro so that 
  1728. its parameter is evaluated exactly once, or prevent clients from invoking the 
  1729. macro with a parameter that has a side-effect. 
  1730.  
  1731. Another possible problem with macros is that they may produce unexpected 
  1732. results because of operator precedence rules.  The invocation, square(i+1) 
  1733. expands to i+1*i+1, which evaluates to i+i+1 instead of the square of i+1.  To 
  1734. ensure the expected behavior, the macro parameter should be enclosed in 
  1735. parentheses where it is used in the macro body. 
  1736.  
  1737. Macros may also behave unexpectedly if they are not syntactically equivalent to 
  1738. an expression.  Consider the macro definition, 
  1739.  
  1740. # define incCounts()  ntotal++; ncurrent++;
  1741. This works fine, unless it is used as a statement.  For example, 
  1742.  
  1743. if (x < 3) incCounts();
  1744. increments ntotal if x < 3 but always increments ncurrent. 
  1745.  
  1746. One solution is to use the comma operator to define the macro: 
  1747.  
  1748. # define incCounts()  (ntotal++, ncurrent++)
  1749. More complicated macros can be written using a do ╨ò while construction: 
  1750.  
  1751.   # define incCounts() \
  1752.      do { ntotal++; ncurrent++; } while (FALSE)
  1753. LCLint detects these pitfalls in macro definitions, and checks that a macro 
  1754. behaves as much like a function as possible.  A client should only be able to 
  1755. tell that a function was implemented by a macro if it attempts to use the macro 
  1756. as a pointer to a function. 
  1757.  
  1758. These checks are done by LCLint on a macro definition corresponding to a 
  1759. function: 
  1760.  
  1761.      Each parameter to a macro (except those declared to be side-effect free, 
  1762.       see Section 8.2.1) must be used exactly once in all possible executions 
  1763.       of the macro, so  side-effecting arguments behave as expected.[21] 
  1764.       (Controlled by macroparams.) 
  1765.      A parameter to a macro may not be used as the left hand side of an 
  1766.       assignment expression or as the operand of an increment or decrement 
  1767.       operator in the macro text, since this produces non-functional behavior. 
  1768.       (Controlled by macroassign.) 
  1769.      Macro parameters must be enclosed in parentheses when they are used in 
  1770.       potentially dangerous contexts.  (Controlled by macroparens.) 
  1771.      A macro definition must be syntactically equivalent to a statement when 
  1772.       it is invoked followed by a semicolon. (Controlled by macrostmt.) 
  1773.      The type of the macro body must match the return type of the 
  1774.       corresponding function.  If the macro is declared with type void, its 
  1775.       body may have any type but the macro value may not be used. 
  1776.      All variables declared in the body of a macro definition must be in the 
  1777.       macro variable namespace, so they do not conflict with variables in the 
  1778.       scope where the macro is invoked (which may be used in the macro 
  1779.       parameters).  By default, the macro namespace is all names prefixed by 
  1780.       m_.  (See Section 9.2 for information on controlling namespaces.) 
  1781.   At the call site, a macro is checked like any other function call. 
  1782.  
  1783.   8.2.1 Side-Effect Free Parameters 
  1784.  
  1785.  Suppose we really do want to implement square as a macro, but want do so in a 
  1786.  safe way.  One way to do this is to require that it is never invoked with a 
  1787.  parameter that has a side-effect.  LCLint will check that this constraint 
  1788.  holds, if the parameter is annotated to be side-effect free.  That is, the 
  1789.  expression corresponding to this parameter must not modify any state, so it 
  1790.  does not matter how many times it is evaluated.  The sef annotation is used to 
  1791.  denote a parameter that may not have any side-effects: 
  1792.  
  1793.      extern int square (/*@sef@*/ int x);
  1794.      # define square(x) ((x) *(x))
  1795.  Now, LCLint will not report an error checking the definition of square even 
  1796.  though x is used more than once. 
  1797.  
  1798.  A message will be reported, however, if square is invoked with a parameter 
  1799.  that has a side-effect. 
  1800.  
  1801.  For the code fragment, 
  1802.  
  1803.   square (i++)
  1804.  LCLint produces the message: 
  1805.  
  1806.      Parameter 1 to square is declared sef, but the argument may modify i: i++
  1807.  It is also an error to pass a non-sef macro parameter as a sef macro parameter 
  1808.  in the body of a macro definition.  For example, 
  1809.  
  1810.      extern int sumsquares (int x, int y);
  1811.      # define sumsquares(x,y) (square(x) + square(y))
  1812.  Although x only appears once in the definition of sumsquares it will be 
  1813.  evaluated twice since square is expanded. LCLint reports an error when a 
  1814.  non-sef macro parameter is passed as a sef parameter. 
  1815.  
  1816.  A parameter may be passed as a sef parameter without an error being reported, 
  1817.  if LCLint can determine that evaluating the parameter has no side-effects. 
  1818.  For function calls, the modifies clause is used to determine if a side-effect 
  1819.  is possible.[22]  To prevent many spurious errors, if the called function has 
  1820.  no modifies clause, LCLint will report an error only if sefuncon is on. 
  1821.  Justifiably paranoid programmers will insist on setting sefuncon on, and will 
  1822.  add modifies clauses to unconstrained functions that are used in sef macro 
  1823.  arguments. 
  1824.  
  1825.   8.2.2 Polymorphism 
  1826.  
  1827.  One problem with our new definition of square is that while the original macro 
  1828.  would work for parameters of any numeric type, LCLint will now report an error 
  1829.  is the new version is used with a non-integer parameter. 
  1830.  
  1831.  We can use the /*@alt type;,+@> syntax to indicate that an alternate type may 
  1832.  be used.  For example, 
  1833.  
  1834.     extern int /*@alt float@*/ square (/*@sef@*/ int /*@alt float@*/ x);
  1835.     # define square(x) ((x) *(x))
  1836.  declares square for both ints and floats. 
  1837.  
  1838.  Alternate types are also useful for declaring functions for which the return 
  1839.  value may be safely ignored (see Section 10.3.2). 
  1840.  
  1841.   8.3 Controlling Macro Checking 
  1842.  
  1843.  By default, LCLint expands macros normally and checks the resulting code after 
  1844.  macros have been expanded.  Flags and control comments may be used to control 
  1845.  which macros are expanded and which are checked as functions or constants. 
  1846.  
  1847.  If  the fcnmacros flag is on, LCLint assumes all macros defined with parameter 
  1848.  lists implement functions and checks them accordingly.  Parameterized macros 
  1849.  are not expanded and are checked as functions with unknown result and 
  1850.  parameter types (or using the types in the prototype, if one is given).  The 
  1851.  analogous flag for macros that define constants is constmacros.  If it is on, 
  1852.  macros with no parameter lists are assumed to be constants, and checked 
  1853.  accordingly.  The allmacros flag sets both fcnmacros and constmacros.  If the 
  1854.  macrofcndecl flag is set, a message reports parameterized macros with no 
  1855.  corresponding function prototype.  If the macroconstdecl flag is set, a 
  1856.  similar message reports macros with no parameters with no corresponding 
  1857.  constant declaration. 
  1858.  
  1859.  The macro checks described in the previous sections make sense only for macros 
  1860.  that are intended to replace functions or constants.  When fcnmacros or 
  1861.  constmacros is on, more general macros need to be marked so they will not be 
  1862.  checked as functions or constants, and will be expanded normally.  Macros 
  1863.  which are not meant to behave like functions should be preceded by the 
  1864.  /*@notfunction@*/ comment.  For example, 
  1865.  
  1866.      /*@notfunction@*/
  1867.      # define forever for(;;)
  1868.  Macros preceded by notfunction are expanded normally before regular checking 
  1869.  is done.  If a macro that is not syntactically equivalent to a statement 
  1870.  without a semi-colon (e.g., a macro which enters a new scope) is not preceded 
  1871.  by notfunction, parse errors may result when fcnmacros or constmacros is on. 
  1872.  
  1873.   8.4 Iterators 
  1874.  
  1875.  It is often useful to be able to execute the same code for many different 
  1876.  values.  For example, we may want to sum all elements in an intSet that 
  1877.  represents a set of integers.  If intSet is an abstract type, there is no easy 
  1878.  way of doing this in a client module without depending on the concrete 
  1879.  representation of the type.  Instead, we could provide such a mechanism as 
  1880.  part of the type's implementation.  We call a mechanism for looping through 
  1881.  many values an iterator. 
  1882.  
  1883.  The C language provides no mechanism for creating user-defined iterators. 
  1884.  LCLint supports a stylized form of iterators declared using syntactic comments 
  1885.  and defined using macros. 
  1886.  
  1887.  Iterator declarations are similar to function declarations except instead of 
  1888.  returning a value, they assign values to their yield parameters in each 
  1889.  iteration.  For example, we could add this iterator declaration to intSet.h: 
  1890.  
  1891.   /*@iter intSet_elements (intSet s, yield int el);@*/
  1892.  The yield annotation means that the variable passed as the second actual 
  1893.  argument is declared as a local variable of type int and assigned a value in 
  1894.  each loop iteration. 
  1895.  
  1896.  Defining Iterators 
  1897.  
  1898.  An iterator is defined using a macro.  Here's one (not particularly efficient) 
  1899.  way of defining intSet_elements: 
  1900.  
  1901.      typedef /*@abstract@*/ struct {
  1902.         int nelements;
  1903.         int *elements;
  1904.      } intSet;
  1905.      ...
  1906.      # define intSet_elements(s,m_el) \
  1907.        { int m_i; \
  1908.          for (m_i = (0); m_i <= ((s)->nelements); m_i++) { \
  1909.              int m_el = (s)->elements[(m_i)];
  1910.  
  1911.      # define end_intSet_elements }}
  1912.  Each time through the loop, the yield parameter m_el is assigned to the next 
  1913.  value.  After all values have been assigned to m_el for one iteration, the 
  1914.  loop terminates.  Variables declared by the iterator macro (including the 
  1915.  yield parameter) are preceded by the macro variable namespace prefix m_ (see 
  1916.  Section 8.2) to avoid conflicts with variables defined in the scope where the 
  1917.  iterator is used. 
  1918.  
  1919.  Using Iterators 
  1920.  
  1921.  The general structure for using an iterator is, 
  1922.  
  1923.  iter (<params>) stmt; end_iter 
  1924.  
  1925.  For example, a client could use intSet_elements to sum the elements of an 
  1926.  intSet: 
  1927.  
  1928.      intSet s;
  1929.      int sum = 0;
  1930.      ...
  1931.      intSet_elements (s, el) {
  1932.         sum += el;
  1933.      } end_intSet_elements;
  1934.  The actual parameter corresponding to a yield parameter, el, is not declared 
  1935.  in the function scope.  Instead, it is declared by the iterator and assigned 
  1936.  to an appropriate value for each iteration. 
  1937.  
  1938.  LCLint will do the following checks for uses of stylized iterators: 
  1939.  
  1940.      An invocation of the iterator iter must be balanced by a corresponding 
  1941.       end, named end_iter. 
  1942.      All actual parameters must be defined, except those corresponding to 
  1943.       yield parameters. 
  1944.      Yield parameters must be new identifiers, not declared in the current 
  1945.       scope or any enclosing scope. 
  1946.   Iterators are a bit awkward to implement, but they enable compact, easily 
  1947.  understood client code.  For abstract collection types, an iterator can be 
  1948.  used to enable clients to operate on elements of the collection without 
  1949.  breaking data abstraction. 
  1950.  
  1951.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1952.  
  1953.   David Evans 
  1954.  Systematic Program Development 
  1955.  evs@larch.lcs.mit.edu 
  1956.  
  1957.  
  1958. ΓòÉΓòÉΓòÉ 1.9. LCLint User's Guide - 9. Naming Conventions ΓòÉΓòÉΓòÉ
  1959.  
  1960.  
  1961.  
  1962.  9.  Naming Conventions 
  1963.  
  1964. Naming conventions tend to be a religious issue. Generally, it doesn't matter 
  1965. too much what naming convention is followed as long as one is chosen and 
  1966. followed religiously.  There are two kinds of naming conventions supported by 
  1967. LCLint.  Type-based naming conventions (Section 9.1) constrain identifier names 
  1968. according to the abstract types that are accessible where the identifier is 
  1969. defined.  Prefix naming conventions (Section 9.2) constrain the initial 
  1970. characters of identifier names according to what is being declared and its 
  1971. scope.  Naming conventions may be combined or different conventions may be 
  1972. selected for different kinds of identifiers.  In addition, LCLint supports 
  1973. checking that names do not conflict with names reserved for the standard 
  1974. library or implementation (Section 9.3) and that names are sufficiently 
  1975. distinguishable from other names. 
  1976.  
  1977. 9.1 Type-Based Naming Conventions 
  1978.  
  1979. Generic naming conventions constrain valid names of identifiers.  By limiting 
  1980. valid names, namespaces may be preserved and programs may be more easily 
  1981. understood since the name gives clues as to how and where the name is defined 
  1982. and how it should be used. 
  1983.  
  1984. Names may be constrained by the scope of the name (external, file static, 
  1985. internal), the file in which the identifier is defined, the type of the 
  1986. identifier, and global constraints. 
  1987.  
  1988. 9.1.1 Czech Names 
  1989.  
  1990. Of course, this is a complete jumble to the uninitiated, and that's the joke. 
  1991. - Charles Simonyi, on the Hungarian naming convention 
  1992.  
  1993. Czech[23] names denote operations and variables of abstract types by preceding 
  1994. the names by <type>_.  The remainder of the name should begin with a lowercase 
  1995. character, but may use any other character besides the underscore.  Types may 
  1996. be named using any non-underscore characters. 
  1997.  
  1998. The Czech naming convention is selected by the czech flag.  If accessczech is 
  1999. on, a function, variable, constant or iterator named <type>_<name> has access 
  2000. to the abstract type <type>. 
  2001.  
  2002. Reporting of violations of the Czech naming convention is controlled by 
  2003. different flags depending on what is being declared: 
  2004.  
  2005. czechfcns 
  2006.  
  2007. Functions and iterators.  An error is reported for a function name of the form 
  2008. <prefix>_<name> where <prefix> is not the name of an accessible type.  Note 
  2009. that if accessczech is on, a type named <prefix> would be accessible in a 
  2010. function beginning with <prefix>_.  If accessczech is off, an error is reported 
  2011. instead. An error is reported for a function name that does not have an 
  2012. underscore if any abstract types are accessible where the function is defined. 
  2013. czechvars 
  2014. czechconstants 
  2015. czechmacros 
  2016.  
  2017. Variables, constants and expanded macros.  An error is reported if the 
  2018. identifier name starts with <prefix>_ and prefix is not the name of an 
  2019. accessible abstract type, or if an abstract type is accessible and the 
  2020. identifier name does not begin with <type>_ where type is the name of an 
  2021. accessible abstract type.  If accessczech is on, the representation of the type 
  2022. is visible in the constant or variable definition.  czechtypes 
  2023.  
  2024. User-defined types.  An error is reported if a type name includes an underscore 
  2025. character. 
  2026.  
  2027. 9.1.2 Slovak Names 
  2028.  
  2029. Slovak names are similar to Czech names, except they are spelled differently. A 
  2030. Slovak name is of the form <type><Name>.  The type prefix may not use uppercase 
  2031. characters.  The remainder of the name starts with the first uppercase 
  2032. character. 
  2033.  
  2034. The slovak flag selects the Slovak naming convention.  Like Czech names, it may 
  2035. be used with accessslovak to control access to abstract representations. The 
  2036. slovakfcns, slovakvars, slovakconstants, and slovakmacros flags are analogous 
  2037. to the similar Czech flags.  If slovaktype is on, an error is reported if a 
  2038. type name includes an uppercase letter. 
  2039.  
  2040.  9.1.3 Czechoslovak Names 
  2041.  
  2042. Czechoslovak names are a combination of Czech names and Slovak names. 
  2043. Operations may be named either <type>_ followed by any sequence of 
  2044. non-underscore characters, or <type> followed by an uppercase letter and any 
  2045. sequence of characters.  Czechoslovak names have been out of favor since 1993, 
  2046. but may be necessary for checking legacy code. The czechoslovakfcns, 
  2047. czechoslovakvars, czechoslovakmacros, and czechoslovakconstants flags are 
  2048. analogous to the similar Czech flags.  If czechoslovaktype is on, an error is 
  2049. reported if a type name contains either an uppercase letter or an underscore 
  2050. character. 
  2051.  
  2052.  9.2 Namespace Prefixes 
  2053.  
  2054. Another way to restrict names is to constrain the leading character sequences 
  2055. of various kinds of identifiers.  For example, a the names of all user-defined 
  2056. types might begin with "T" followed by an uppercase letter and all file static 
  2057. names begin with an uppercase letter.  This may be useful for enforcing a 
  2058. namespace (e.g., all names exported by the X-windows library should begin with 
  2059. "X") or just making programs easier to understand by establishing an enforced 
  2060. convention.  LCLint can be used to constrain identifiers in this way to detect 
  2061. identifiers inconsistent with prefixes. 
  2062.  
  2063. All namespace flags are of the form, -<context>prefix <string>.  For example, 
  2064. the macro variable namespace restricting identifiers declared in macro bodies 
  2065. to be preceded by "m_" would be selected by -macrovarprefix "m_".  The string 
  2066. may contain regular characters that may appear in a C identifier.  These must 
  2067. match the initial characters of the identifier name.  In addition, special 
  2068. characters (shown in Table 1) can be used to denoted a class of characters.[24] 
  2069. The * character may be used at the end of a prefix string to specify the rest 
  2070. of the identifier is zero or more characters matching the character immediately 
  2071. before the *. For example, the prefix string "T&*" matches "T" or "TWINDOW" but 
  2072. not "Twin". 
  2073.  
  2074. ^    Any uppercase letter, A-Z
  2075. &    Any lowercase letter, a-z
  2076. %    Any character that is not an uppercase letter (allows lowercase
  2077.      letters, digits and underscore)
  2078. ~    Any character that is not a lowercase letter (allows uppercase letters,
  2079.      digits and underscore)
  2080. $    Any letter (a-z, A-Z)
  2081. /    Any letter or digit (A-Z, a-z, 0-9)
  2082. ?    Any character valid in a C identifier
  2083. #    Any digit, 0-9
  2084.  
  2085. Table 1.  Prefix character codes. 
  2086.  
  2087.  Different prefixes can be selected for the following identifier contexts: 
  2088.  
  2089. macrovarprefix 
  2090.  
  2091.  Any variable declared inside a macro body  uncheckedmacroprefix 
  2092.  
  2093.  Any macro that is not checked as a function or constant (see Section 8.4) 
  2094. tagprefix 
  2095.  
  2096. Tags for struct, union and enum declarations  enumprefix 
  2097.  
  2098. Members of enum types  typeprefix 
  2099.  
  2100. Name of a user-defined type  filestaticprefix 
  2101.  
  2102. Any identifier with file static scope  globvarprefix 
  2103.  
  2104. Any variable (not of function type) with global variables scope  externalprefix 
  2105.  
  2106. Any exported identifier 
  2107.  
  2108. If an identifier is in more than one of the namespace contexts, the most 
  2109. specific defined namespace prefix is used (e.g., a global variable is also an 
  2110. exported identifier, so if globalvarprefix is set, it is checked against the 
  2111. variable name; if not, the identifier is checked against the externalprefix.) 
  2112.  
  2113. For each prefix flag, a corresponding flag named <prefixname>exclude controls 
  2114. whether errors are reported if identifiers in a different namespace match the 
  2115. namespace prefix.  For example, if macrovarprefixexclude is on, LCLint checks 
  2116. that no identifier that is not a variable declared inside a macro body uses the 
  2117. macro variable prefix. 
  2118.  
  2119. Here is a (somewhat draconian) sample naming convention: 
  2120.  
  2121. -uncheckedmacroprefix "~*" 
  2122.     unchecked macros have no lowercase letters 
  2123.  -typeprefix "T^&*" 
  2124.  all type typenames begin with T followed by an uppercase letter.  The rest of 
  2125. the name is all lowercase letters. 
  2126. +typeprefixexclude 
  2127. no identifier that does not name a user-defined type may begin with the type 
  2128. name prefix (set above) 
  2129.  -filestaticprefix"^&&&" 
  2130.  file static scope variables begin with an uppercase letter and three lowercase 
  2131. letters 
  2132.  -globvarprefix "G" 
  2133.  all global variables variables start with G 
  2134.  +globvarprefixexclude 
  2135. no identifier that is not a global variable starts with G 
  2136.  
  2137.  
  2138.  
  2139.  9.3 Naming Restrictions 
  2140.  
  2141.  Additional naming restrictions can be used to check that names do no conflict 
  2142. with names reserved for the standard library, and that identifier are 
  2143. sufficiently distinct (either for the compiler and linker, or for the 
  2144. programmer.) Restrictions may be different for names that are needed by the 
  2145. linker (external names) and names that are only needed during compilations 
  2146. (internal names).  Names of non-static functions and global variables are 
  2147. external; all other names are internal. 
  2148.  
  2149.  9.3.1 Reserved Names 
  2150.  
  2151.  Many names are reserved for the implementation and standard library.  A 
  2152. complete list of reserved names can be found in [vdL, p. 126-128] or [ANSI, 
  2153. Section 4].  Some name prefixes such as str followed by a lowercase character 
  2154. are reserved for future library extensions.  Most C compilers do not detect 
  2155. naming conflicts, and they can lead to unpredictable program behavior.  If 
  2156. ansireserved is on, LCLint reports errors for external names that conflict with 
  2157. reserved names.  If ansireservedinternal is on, errors are also reported for 
  2158. internal names. 
  2159.  
  2160.  9.3.2 Distinct Identifiers 
  2161.  
  2162.  The decision to retain the old six-character case-insensitive restriction on 
  2163. significance was most painful. 
  2164. - ANSI C Rationale 
  2165.  
  2166.  LCLint can check that identifiers differ within a given number of characters, 
  2167. optionally ignoring alphabetic case and differences between characters that 
  2168. look similar. The number of significant characters may be different for 
  2169. external and internal names. 
  2170.  
  2171.  Using +distinctexternalnames sets the number of significant characters for 
  2172. external names to six and makes alphabetical case insignificant for external 
  2173. names.  This is the minimum significance acceptable in an ANSI-conforming 
  2174. compiler.  Most modern compilers exceed these minimums (which are particularly 
  2175. hard to follow if one uses the Czech or Slovak naming convention).  The number 
  2176. of significant characters can be changed using the externalnamelength <number> 
  2177. flag.  If externalnamecaseinsensitive is on, alphabetical case is ignored in 
  2178. comparing external names. LCLint reports identifiers that differ only in 
  2179. alphabetic case. 
  2180.  
  2181.  For internal identifiers, a conforming compiler must recognize at least 31 
  2182. characters and treat alphabetical cases distinctly.  Nevertheless, it may still 
  2183. be useful to check that internal names are more distinct then required by the 
  2184. compiler to minimize the likelihood that identifiers are confused in the 
  2185. program.  Analogously to external names, the internalnamelength <number> flag 
  2186. sets the number of significant characters in an internal name and 
  2187. internalnamecaseinsensitive sets the case sensitivity.  The 
  2188. internalnamelookalike flag further restricts distinctions between identifiers. 
  2189. When set, similar-looking characters match -- the lowercase letter "l" matches 
  2190. the uppercase letter "I" and the number "1"; the letter "O" or "o" matches the 
  2191. number "0"; "5" matches "S"; and "2" matches "Z".  Identifiers that are not 
  2192. distinct except for look-alike characters will produce an error message. 
  2193. External names are also internal names, so they must satisfy both the external 
  2194. and internal distinct identifier checks. 
  2195.  
  2196.  Figure 18 illustrates some of the name checking done by LCLint. 
  2197.  
  2198. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2199.  
  2200.  David Evans 
  2201. Systematic Program Development 
  2202. evs@larch.lcs.mit.edu 
  2203.  
  2204.  
  2205. ΓòÉΓòÉΓòÉ 1.10. LCLint User's Guide - 10. Other Checks ΓòÉΓòÉΓòÉ
  2206.  
  2207.  
  2208.  
  2209.  10. Other Checks 
  2210.  
  2211.  The section describes other errors detected by LCLint that are not directly 
  2212. related to extra information provided in annotations.  Many of the checks are 
  2213. significantly improved, however, because of the extra information that is known 
  2214. about the program. 
  2215.  
  2216.  10.1 Undefined Evaluation Order 
  2217.  
  2218.  The order in which side effects take place in a C program is not entirely 
  2219. defined by the code.  Certain execution points are known as sequence points -- 
  2220. a function call (after the arguments have been evaluated), the end of a full 
  2221. expression (an initializer, expression in an expression statement, the control 
  2222. expression of an if, switch, while or do statement, each expression of a for 
  2223. statement, and the expression in a return statement), and after the first 
  2224. operand or a &&, ||, ? or , operand. 
  2225.  
  2226.  All side effects before a sequence point must be complete before the sequence 
  2227. point, and no evaluations after the sequence point shall have taken place 
  2228. [ANSI, Section 2.1.2.3].  Between sequence points, side effects and evaluations 
  2229. may take place in any order. Hence, the order in which expressions or arguments 
  2230. are evaluated is not specified.  Compilers are free to evaluate function 
  2231. arguments and parts of expressions (that do not contain sequence points) in any 
  2232. order.  The behavior of code that uses a value that is modified by another 
  2233. expression that is not required to be evaluated before or after the other use 
  2234. is undefined. 
  2235.  
  2236.  LCLint detects instances where undetermined order of evaluation produces 
  2237. undefined behavior.  If modifies clauses and globals lists are used, this 
  2238. checking is enabled in expressions involving function calls. Evaluation order 
  2239. checking is controlled by the evalorder flag. 
  2240.  
  2241.  When checking systems without modifies and globals information, evaluation 
  2242. order checking may report errors when unconstrained functions are called in 
  2243. procedure arguments. Since LCLint has no annotations to constrain what these 
  2244. functions may modify, it cannot be guaranteed that the evaluation order is 
  2245. defined if another argument calls an unconstrained function or uses a global 
  2246. variable or storage reachable from a parameter to the unconstrained function. 
  2247. Its best to add modifies and globals clauses to constrain the unconstrained 
  2248. functions in ways that eliminate the possibility of undefined behavior.  For 
  2249. large legacy systems, this may require too much effort.  Instead, the 
  2250. -evalorderuncon flag may be used to prevent reporting of undefined behavior due 
  2251. to the order of evaluation of unconstrained functions. 
  2252.  
  2253. Figure 19.  Evaluation order 
  2254.  
  2255.  
  2256.  
  2257. 10.2 Problematic Control Structures 
  2258.  
  2259.  A number of control structures that are syntactically legal may indicate 
  2260. likely bugs in programs.  LCLint can detect errors involving likely infinite 
  2261. loops (Section 10.2.1), fall through cases and missing cases in switch 
  2262. statements (Section 10.2.2), break statements within deeply nested loops or 
  2263. switches (Section 10.2.3), clauses of if, while or for statements that are 
  2264. empty statements or unblocked single statements (Section 10.2.4) and incomplete 
  2265. if-else logic (Section 10.2.5).  Although any of these may appear in a correct 
  2266. program, depending on the programming style used they may indicate likely bugs 
  2267. or style violations that should be detected and eliminated. 
  2268.  
  2269. 10.2.1 Likely Infinite Loops 
  2270.  
  2271.  LCLint reports an error if it detects a loop that appears to be infinite.  An 
  2272. error is reported for a loop which does not modify any value used in its 
  2273. condition test inside the body of the loop or in the condition test itself. 
  2274. This checking is enhanced by modifies clauses and globals lists since they 
  2275. provide more information about what global variable may be used in the 
  2276. condition test and what values may be modified by function calls in the loop 
  2277. body. 
  2278.  
  2279.  Figure 20 shows examples of infinite loops detected by LCLint. An error is 
  2280. reported for the loop in line 14, since neither of the values used in the loop 
  2281. condition (x directly and glob1 through the call to f) is modified by the body 
  2282. of the loop.  If the declaration of g is changed to include glob1 in the 
  2283. modifies clause no error is reported.  (In this example, if we assume the 
  2284. annotations are correct, then the programmer has probably called the wrong 
  2285. function in the loop body.  This isn't surprising, given the horrible choices 
  2286. of function and variable names!) 
  2287.  
  2288. If an unconstrained function is called within the loop body, LCLint will assume 
  2289. that it modifies a value used in the condition test and not report an infinite 
  2290. loop error, unless infloopsuncon is on.  If infloopsuncon is on, LCLint will 
  2291. report infinite loop errors for loops where there is no explicit modification 
  2292. of a value used in the condition test, but where they may be an undetected 
  2293. modification through a call to an unconstrained function (e.g., line 15 in 
  2294. Figure 20). 
  2295.  
  2296.  
  2297.  
  2298. 10.2.2 Switches 
  2299.  
  2300. The automatic fall-through of C switch statements is almost never the intended 
  2301. behavior.[25]  LCLint detects case statements with code that may fall through 
  2302. to the next case.  The casebreak flag controls reporting of fall through cases. 
  2303. A single fall through case may be marked by preceding the case keyword with 
  2304. /*@fallthrough@*/ to indicate explicitly that execution falls through to this 
  2305. case. 
  2306.  
  2307. For switches on enum types, LCLint reports an error if a member of the 
  2308. enumerator does not appear as a case in the switch body (and there is no 
  2309. default case).  (Controlled by misscase.) 
  2310.  
  2311. An example of switch checking is shown in Figure 21. 
  2312.  
  2313. 10.2.3 Deep Breaks 
  2314.  
  2315. There is no syntax provided by C (other than goto) for breaking out of a nested 
  2316. loop.  All break and continue statements act only on the innermost surrounding 
  2317. loop or switch.  This often leads to serious problems[26] when a programmer 
  2318. intends to break the outer loop or switch instead.  LCLint optionally reports 
  2319. errors for break and continue statements in nested contexts. 
  2320.  
  2321.      break inside a loop (while or for) that is inside a loop.  Controlled by 
  2322.       looploopbreak.  To indicate that a break is inside an inner loop, precede 
  2323.       the break by /*@innerbreak@*/. 
  2324.      break inside a loop that is inside a switch statement.  Controlled by 
  2325.       switchloopbreak.  To mark the break as a loop break, precede the break by 
  2326.       /*@loopbreak@*/. 
  2327.      break inside a switch statement that is inside a loop.  Controlled by 
  2328.       loopswitchbreak.  To mark the break as a switch break, precede the break 
  2329.       by /*@switchbreak@*/. 
  2330.      break inside a switch inside another switch.  Controlled by 
  2331.       switchswitchbreak.  To indicate that the break is for the inner switch, 
  2332.       use /*@innerbreak@*/. 
  2333.   Since continue only makes sense within loops, errors are only reported for 
  2334.  continue statements within nested loops.  (Controlled by looploopcontinue.)  A 
  2335.  safe inner continue may be precede by /*@innercontinue@*/ to suppress error 
  2336.  messages locally. The deepbreak flag sets all nested break and continue 
  2337.  checking flags. 
  2338.  
  2339.  LCLint reports an error if the marker preceding a break is not consistent with 
  2340.  its effect.  An error is reported if innerbreak precedes a break that is not 
  2341.  breaking an inner loop, switchbreak precedes a break that is not breaking a 
  2342.  switch, or loopbreak precedes a break that is not breaking a loop. 
  2343.  
  2344.  10.2.4 Loop and If Bodies 
  2345.  
  2346.  An empty statement after an if, while or for often indicates a potential bug. 
  2347.  A single statement (i.e., not a compound block) after an if, while or for is 
  2348.  not likely to indicate a bug, but make the code harder to read and edit. 
  2349.  LCLint can report errors for if or loop statements with empty bodies or bodies 
  2350.  that are not compound statements.  Separate flags control checking for 
  2351.  statements following an  if, while or for: 
  2352.  
  2353.      [if, while, for] empty -- report errors for empty bodies (e.g., if (x > 
  2354.       3) ;) 
  2355.      [if, while, for] block -- report errors for non-block bodies (e.g., if (x 
  2356.       > 3) x++;) 
  2357.   The if statement checks also apply to the body of the else clause.  An 
  2358.  ifblock error is not reported if the body of the else clause is an if 
  2359.  statement, to allow else if chains. 
  2360.  
  2361.  10.2.5 Complete if-else Logic 
  2362.  
  2363.  Although it may be perfectly reasonable in many contexts, an if-else chain 
  2364.  with no final else may indicate missing logic or forgetting to check error 
  2365.  cases. If elseifcomplete is on, LCLint reports errors when an if statement 
  2366.  that is the body of an else clause does not have a matching else clause.  For 
  2367.  example, the code, 
  2368.  
  2369.      if (x == 0) { return "nil"; }
  2370.      else if (x == 1) { return "many"; }
  2371.  produces an error message since the second if has no matching else branch. 
  2372.  
  2373.  10.3 Suspicious Statements 
  2374.  
  2375.   LCLint detects errors involving statements with no apparent effects (Section 
  2376.  10.3.1) and statements that ignore the result of a called function (Section 
  2377.  10.3.2). 
  2378.  
  2379.  10.3.1 Statements with No Effects 
  2380.  
  2381.   LCLint can report errors for statements that have no effect.  (Controlled by 
  2382.  noeffect.)  Because of modifies clauses, LCLint can detect more errors than 
  2383.  traditional checkers.  Unless the noeffectuncon flag is on, errors are not 
  2384.  reported for statements that involve calls to unconstrained functions since 
  2385.  the unconstrained function may cause a modification. 
  2386.  
  2387.  Figure 22.  Statements with no effect. 
  2388.  
  2389.  
  2390.  
  2391.   10.3.2 Ignored Return Values 
  2392.  
  2393.  LCLint reports an error when a return value is ignored.  Checking may be 
  2394.  controlled based on the type of the return value: retvalint controls reporting 
  2395.  of ignored return values of type int, and retvalbool for return values of type 
  2396.  bool, and retvalothers for all other types.  A function statement may be cast 
  2397.  to void to prevent this error from being reported. 
  2398.  
  2399.  Alternate types (Section 8.2.2) can be used to declare functions that return 
  2400.  values that may safely be ignored by declaring the result type to alternately 
  2401.  by void.  Several functions in the standard library are specified to 
  2402.  alternately return void to prevent ignored return value errors for standard 
  2403.  library functions (e.g., strcpy) where the result may be safely ignored (see 
  2404.  Apppendix F). 
  2405.  
  2406.  Figure 23 shows example of ignored return value errors reported by LCLint. 
  2407.  
  2408.  
  2409.  
  2410.  10.4 Unused Declarations 
  2411.  
  2412.  LCLint detects constants, functions, parameters, variables, types, enumerator 
  2413.  members, and structure or union fields that are declared but never used.  The 
  2414.  flags constuse, fcnuse, paramuse, varuse, typeuse, enummemuse and fielduse 
  2415.  control whether unused declaration errors are reported for each kind of 
  2416.  declaration. Errors for exported declarations are reported only if topuse is 
  2417.  on (see Section 10.5). 
  2418.  
  2419.  The /*@unused@*/ annotation can be used before a declaration to indicate that 
  2420.  the item declared need not be used.  Unused declaration errors are not 
  2421.  reported for identifiers declared with unused. 
  2422.  
  2423.   10.5 Complete Programs 
  2424.  
  2425.  LCLint can be used on both complete and partial programs.  When checking 
  2426.  complete programs, additional checks can be done to ensure that every 
  2427.  identifier declared by the program is defined and used, and that functions 
  2428.  that do not need to be exported are declared static. 
  2429.  
  2430.  LCLint checks that all declared variables and functions are defined 
  2431.  (controlled by compdef). Declarations of functions and variables that are 
  2432.  defined in an external library, may be preceded by /*@external@*/ to suppress 
  2433.  undefined declaration errors. 
  2434.  
  2435.  LCLint reports external declarations which are unused (Controlled by topuse). 
  2436.  Which declarations are reported also depends on the declaration use flags (see 
  2437.  Section 10.4). 
  2438.  
  2439.  The partial flag sets flags for checking a partial system.  Top-level unused 
  2440.  declarations, undefined declarations, and unnecessary external names are not 
  2441.  reported if partial is set. 
  2442.  
  2443.   10.5.1 Unnecessary External Names 
  2444.  
  2445.  LCLint can report variables and functions that are declared with global scope 
  2446.  (i.e., without using static), that are not used outside the file in which they 
  2447.  are defined.  In a stand-alone system, these identifiers should usually be 
  2448.  declared using static to limit their scope.  If the exportstatic flag is on, 
  2449.  LCLint will report declarations that could have file scope.  It should only be 
  2450.  used when all relevant source files are listed on the LCLint command line; 
  2451.  otherwise, variables and functions may be incorrectly identified as only used 
  2452.  in the file scope since LCLint did not process the other file in which they 
  2453.  are used. 
  2454.  
  2455.   10.5.2 Declarations Missing from Headers 
  2456.  
  2457.  A common practice in C programming styles, is that every function or variable 
  2458.  exported by M.c is declared in M.h.  If the exportheader flag is on, LCLint 
  2459.  will report exported declarations in M.c  that are not declared in M.h. 
  2460.  
  2461.  
  2462.  
  2463.   10.6 Compiler Limits 
  2464.  
  2465.  The ANSI Standard includes limits on minimum numbers that a conforming 
  2466.  compiler must support.  Whether of not a particular compiler exceeds these 
  2467.  limits, it is worth checking that a program does not exceed them so that it 
  2468.  may be safely compiled by other compilers.  In addition, exceeding a limit may 
  2469.  indicate a problem in the code (e.g., it is too complex if the control nest 
  2470.  depth limit is exceeded) that should be fixed regardless of the compiler.  The 
  2471.  following limits are checked by LCLint.  For each  limit, the maximum value 
  2472.  may be set from the command line (or locally using a stylized comment).  If 
  2473.  the ansilimits flag is on, all limits are checked with the minimum values of a 
  2474.  conforming compiler. 
  2475.  
  2476.  includenest 
  2477.  
  2478.  Maximum nesting depth of file inclusion (#include).  (ANSI minimum is 8) 
  2479.  controlnestdepth 
  2480.  
  2481.  Maximum nesting of compound statements, control structures.  (ANSI minimum is 
  2482.  15)  numenummembers 
  2483.  
  2484.  Number of members in an enum declaration. (ANSI minimum is 127) 
  2485.  numstructfields 
  2486.  
  2487.  Number of fields in a struct or union declaration. (ANSI minimum is 127) 
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  Since human beings themselves are not fully debugged yet, there will be bugs 
  2496.  in your code no matter what you do. 
  2497.  - Chris Mason, Zero-defects  memo (Microsoft Secrets, Cusumano and Selby) 
  2498.  
  2499.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2500.  
  2501.   David Evans 
  2502.  Systematic Program Development 
  2503.  evs@larch.lcs.mit.edu 
  2504.  
  2505.  
  2506. ΓòÉΓòÉΓòÉ 1.11. LCLint User's Guide - Appendix A  Availability ΓòÉΓòÉΓòÉ
  2507.  
  2508.  
  2509.  
  2510. Appendix A  Availability 
  2511.  
  2512.  
  2513.  
  2514. The web home page for LCLint is 
  2515. http://larch-www.lcs.mit.edu:8001/larch/lclint/index.html. It includes this 
  2516. guide in postscript format, samples demonstrating LCLint, and links to related 
  2517. web sites. 
  2518.  
  2519. LCLint can be downloaded from 
  2520. http://larch-www.lcs.mit.edu:8001/larch/lclint/download.html or obtained via 
  2521. anonymous ftp from ftp://larch.lcs.mit.edu/pub/Larch/lclint/ 
  2522.  
  2523. Several UNIX platforms are supported and source code is provided for other 
  2524. platforms. 
  2525.  
  2526. LCLint can also be run remotely using a form at 
  2527. http://larch-www.lcs.mit.edu:8001/larch/lclint/run.html 
  2528.  
  2529. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2530.  
  2531.  David Evans 
  2532. Systematic Program Development 
  2533. evs@larch.lcs.mit.edu 
  2534.  
  2535.  
  2536. ΓòÉΓòÉΓòÉ 1.12. LCLint User's Guide - Appendix B  Communication ΓòÉΓòÉΓòÉ
  2537.  
  2538.  
  2539.  
  2540. Appendix B  Communication 
  2541.  
  2542. LCLint development is largely driven by suggestions and comments from users. 
  2543. We are also very interested in hearing about your experiences using LCLint in 
  2544. developing or maintaining programs, enforcing coding standards, or teaching 
  2545. courses.  For general information, suggestions, and questions on LCLint send 
  2546. mail to lclint@larch.lcs.mit.edu. 
  2547.  
  2548. To report a bug in LCLint send a message to lclint-bug@larch.lcs.mit.edu. 
  2549.  
  2550. There are two mailing lists associated with LCLint: 
  2551.  
  2552. lclint-announce@larch.lcs.mit.edu 
  2553.  
  2554. Reserved for announcements of new releases and bug fixes.  (Everyone who sends 
  2555. mail regarding LCLint is added to this list.) 
  2556. lclint-interest@larch.lcs.mit.edu 
  2557.  
  2558. Informal discussions on the use and development of LCLint.  To subscribe, send 
  2559. a (human-readable) message to lclint-request@larch.lcs.mit.edu, or use a form. 
  2560.  
  2561. LCLint discussions relating to checks enabled by specifications or annotations 
  2562. are welcome in the comp.specification.larch  usenet group.  Messages more 
  2563. focused on C-specific checking would be more appropriate for the 
  2564. lclint-interest list of one of the C language groups. 
  2565.  
  2566. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2567.  
  2568.  David Evans 
  2569. Systematic Program Development 
  2570. evs@larch.lcs.mit.edu 
  2571.  
  2572.  
  2573. ΓòÉΓòÉΓòÉ 1.13. LCLint User's Guide - Appendix C  Flags ΓòÉΓòÉΓòÉ
  2574.  
  2575.  
  2576.  
  2577. Appendix C  Flags 
  2578.  
  2579.  Flags can be grouped into four major categories: 
  2580.  
  2581.      Global flags for controlling initializations and global behavior 
  2582.      Message format flags for controlling how messages are displayed 
  2583.      Mode selectors for coarse control of LCLint checking 
  2584.      Checking flags that control checking and what classes of     messages are 
  2585.       reported 
  2586.   Global flags can be used in initialization files and at the command line; all 
  2587.  other flags may also be used in control comments. 
  2588.  
  2589.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2590.  
  2591.   David Evans 
  2592.  Systematic Program Development 
  2593.  evs@larch.lcs.mit.edu 
  2594.  
  2595.  
  2596. ΓòÉΓòÉΓòÉ 1.13.1. Global Flags ΓòÉΓòÉΓòÉ
  2597.  
  2598. Global Flags 
  2599.  
  2600. Global flags can be set at the command line or in an options file, but cannot 
  2601. be set locally using stylized comments.  These flags control on-line help, 
  2602. initialization files, pre-processor flags, libraries and output. 
  2603.  
  2604.  Help 
  2605.  
  2606. On-line help provides documentation on LCLint operation and flags.  When a help 
  2607. flag is used, no checking is done by LCLint.  Help flags may be preceded by - 
  2608. or +. 
  2609.  
  2610. help 
  2611.  
  2612. Display general help overview, including list of additional help topics.  help 
  2613. <topic> 
  2614.  
  2615. Display help on <topic>. Available topics: 
  2616.  
  2617. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2618. Γöéannotations                           Γöédescribe annotations                  Γöé
  2619. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2620. Γöécomments                              Γöédescribe control comments             Γöé
  2621. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2622. Γöéflags                                 Γöésummarize flag categories             Γöé
  2623. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2624. Γöéflags <category>                      Γöéall flags pertaining to <category>    Γöé
  2625. Γöé                                      Γöé(one of the categories listed by      Γöé
  2626. Γöé                                      Γöélclint -help flags)                   Γöé
  2627. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2628. Γöéflags alpha                           Γöéall flags in alphabetical order       Γöé
  2629. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2630. Γöéflags full                            Γöéprint a full description of all flags Γöé
  2631. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2632. Γöémail                                  Γöéprint information on mailing lists    Γöé
  2633. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2634. Γöémodes                                 Γöéflags settings in modes               Γöé
  2635. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2636. Γöéprefixcodes                           Γöécharacter codes for setting namespace Γöé
  2637. Γöé                                      Γöéprefixes                              Γöé
  2638. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2639. Γöéreferences                            Γöéprint references to relevant papers   Γöé
  2640. Γöé                                      Γöéand web sites                         Γöé
  2641. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2642. Γöévars                                  Γöédescribe environment variables        Γöé
  2643. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2644. Γöéversion                               Γöéprint maintainer and version          Γöé
  2645. Γöé                                      Γöéinformation                           Γöé
  2646. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2647.  help <flag> 
  2648.  
  2649. Describe flag <flag>.  (May list several flags.)  warnflags 
  2650.  
  2651. Display a warning when a flag is set in a surprising way.  An error is reported 
  2652. if an obsolete (LCLint Version 1.4 or earlier) flag is set, a flag is set to 
  2653. its current value (i.e., the + or - may be wrong), or a mode selector flag is 
  2654. set after mode checking flags that will be reset by the mode were set.  By 
  2655. default, warnflags is on.  To suppress flag warnings, use -warnflags. 
  2656.  
  2657. Initialization 
  2658.  
  2659. These flags control directories and files used by LCLint.  They may be used 
  2660. from the command line or in an options file, but may not be used as control 
  2661. comments in the source code.  Except where noted. they have the same meaning 
  2662. preceded by - or +. 
  2663.  
  2664.  tmpdir <directory> 
  2665.  
  2666. Set directory for writing temp files.  Default is /tmp/.  I<directory> 
  2667.  
  2668. Add directory to path searched for C include files.  Note there is no space 
  2669. after the I, to be consistent with C preprocessor flags.  S<directory> 
  2670.  
  2671. Add directory to path search for .lcl specification files. 
  2672.  
  2673.  f <file> 
  2674.  
  2675. Load options file <file>.  If this flag is used from the command line, the 
  2676. default ~/.lclintrc file is not loaded.  This flag may be used in an options 
  2677. file to load in another options file.  nof 
  2678.  
  2679. Prevents the default options files (./.lclintrc and ~/.lclintrc) from being 
  2680. loaded.  (Setting -nof overrides +nof, causing the options files to be loaded 
  2681. normally.)  systemdirs 
  2682.  
  2683. Set directories for system files (default is "/usr/include").  Separate 
  2684. directories with colons (e.g., "/usr/include:/usr/local/lib").  Flag settings 
  2685. propagate to files in a system directory.  If -systemdirerrors is set, no 
  2686. errors are reported for files in system directories. 
  2687.  
  2688. Pre-processor 
  2689.  
  2690. These flags are used to define or undefine pre-processor constants.  The 
  2691. -I<directory> flag is also passed to the C pre-processor. 
  2692.  
  2693.  D<initializer> 
  2694.  
  2695. Passed to the C pre-processor.  U<initializer> 
  2696.  
  2697. Passed to the C pre-processor 
  2698.  
  2699. Libraries 
  2700.  
  2701. These flags control the creation and use of libraries. 
  2702.  
  2703. dump <file> 
  2704.  
  2705. Save state in <file> for loading.  The default extension .lcd is added if 
  2706. <file> has no extension.  load <file> 
  2707.  
  2708. Load state from <file> (created by -dump).  The default extension .lcd is added 
  2709. if <file> has no extension.  Only one library file may be loaded. 
  2710.  
  2711. By default, the standard library is loaded if the -load flag is not used to 
  2712. load a user library.  If no user library is loaded, one of the following flags 
  2713. may be used to select a different standard library.  Precede the flag by + to 
  2714. load the described library (or prevent a library from being loaded using 
  2715. nolib).  See Apppendix F for information on the provided libraries. 
  2716.  
  2717. nolib 
  2718.  
  2719. Do not load any library.  This prevents the standard library from being loaded. 
  2720. ansi-lib 
  2721.  
  2722. Use the ANSI standard library (selected by default).  strict-lib 
  2723.  
  2724. Use strict version of the ANSI standard library.  posix-lib 
  2725.  
  2726. Use the POSIX standard library.  posix-strict-lib 
  2727.  
  2728. Use the strict version of the POSIX standard library.  unix-lib 
  2729.  
  2730. Use UNIX version of standard library.  unix-strict-lib 
  2731.  
  2732. Use the strict version of the UNIX standard library. 
  2733.  
  2734. Output 
  2735.  
  2736. These flags control what additional information is printed by LCLint.  Setting 
  2737. +<flag> causes the described information to be printed;  setting -<flag> 
  2738. prevents it.  By default, all these flags are off. 
  2739.  
  2740. usestderr 
  2741.  
  2742. Send error messages to standard error (instead of standard out).  showsummary 
  2743.  
  2744. Show a summary of all errors reported and suppressed.  Counts of suppressed 
  2745. errors are not necessarily correct since turning a flag off may prevent some 
  2746. checking from being done to save computation, and errors that are not reported 
  2747. may propagate differently from when they are reported.  showscan 
  2748.  
  2749. Show file names are they are processed.  showalluses 
  2750.  
  2751. Show list of uses of all external identifiers sorted by number of uses.  stats 
  2752.  
  2753. Display number of lines processed and checking time.  timedist 
  2754.  
  2755. Display distribution of where checking time is spent.  quiet 
  2756.  
  2757. Suppress herald and error count.  (If quiet is not set, LCLint prints out a 
  2758. herald with version  information before checking begins, and a line summarizing 
  2759. the total number of errors reported.)  whichlib 
  2760.  
  2761. Print out the standard library filename and creation information.  limit 
  2762. <number> 
  2763.  
  2764. At most <number> similar errors are reported consecutively. Further errors are 
  2765. suppressed, and a message showing the number of suppressed messages is printed. 
  2766.  
  2767. Expected Errors 
  2768.  
  2769. Normally, LCLint will expect to report no errors.  The exit status will be 
  2770. success (0) if no errors are reported, and failure if any errors are reported. 
  2771. Flags can be used to set the expected number of reported errors. Because of the 
  2772. provided error suppression mechanisms, these options should probably not be 
  2773. used for final checking real programs but may be useful in developing programs 
  2774. using make. 
  2775.  
  2776. expect <number> 
  2777.  
  2778. Exactly <number> code errors are expected.  LCLint will exit with failure exit 
  2779. status unless <number> code errors are detected. 
  2780.  
  2781. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2782.  
  2783.  David Evans 
  2784. Systematic Program Development 
  2785. evs@larch.lcs.mit.edu 
  2786.  
  2787.  
  2788. ΓòÉΓòÉΓòÉ 1.13.2. Message Format ΓòÉΓòÉΓòÉ
  2789.  
  2790. Message Format 
  2791.  
  2792. These flags control how messages are printed.  They may be set at the command 
  2793. line, in options files, or locally in syntactic comments.  The linelen and 
  2794. limit flags may be preceded by + or - with the same meaning; for the other 
  2795. flags, + turns on the describe printing and - turns it off.  The box to the 
  2796. left of each flag gives its default value. 
  2797.  
  2798.  showcolumn 
  2799.  
  2800. Show column number where error is found.  Default: +  showfunc 
  2801.  
  2802. Show name of function (or macro) definition containing error.  The function 
  2803. name is printed once before the first message detected in that function. 
  2804. Default: + 
  2805.  
  2806.  showallconjs 
  2807.  
  2808. Show all possible alternate types (see Section 8.2.2).  Default: -  hints 
  2809.  
  2810. Provide hints describing an error and how a message may be suppressed for the 
  2811. first error reported in each error class. Default: +  forcehints 
  2812.  
  2813. Provide hints for all errors reported, even if the hint has already been 
  2814. displayed for the same error class.  Default: -  linelen <number> 
  2815.  
  2816. Set length of maximum message line to <number> characters.  LCLint will split 
  2817. messages longer than <number> characters long into multiple lines.  Default: 80 
  2818.  
  2819. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2820.  
  2821.  David Evans 
  2822. Systematic Program Development 
  2823. evs@larch.lcs.mit.edu 
  2824.  
  2825.  
  2826. ΓòÉΓòÉΓòÉ 1.13.3. Mode Selector Flags ΓòÉΓòÉΓòÉ
  2827.  
  2828. Mode Selector Flags 
  2829.  
  2830. Mode selects flags set the mode checking flags to predefined values. They 
  2831. provide a quick coarse-grain way of controlling what classes of errors are 
  2832. reported. Specific checking flags may be set after a mode flag to override the 
  2833. mode settings.  Mode flags may be used locally, however the mode settings will 
  2834. override specific command line flag settings.  A warning is produced if a mode 
  2835. flag is used after a mode checking flag has been set. 
  2836.  
  2837. These are brief descriptions to give a general idea of what each mode does.  To 
  2838. see the complete flag settings in each mode, use lclint -help modes. A mode 
  2839. flag has the same effect when used with either + or -. 
  2840.  
  2841. weak 
  2842.  
  2843. Weak checking, intended for typical unannotated C code.  No modifies checking, 
  2844. macro checking, rep exposure, or clean interface checking is done.  Return 
  2845. values of type int may be ignored.  The types bool, int, char and user-defined 
  2846. enum types are all equivalent.  Old style declarations are unreported. 
  2847. standard 
  2848.  
  2849. The default mode.  All checking done by weak, plus modifies checking, global 
  2850. alias checking, use all parameters, using released storage, ignored return 
  2851. values or any type, macro checking, unreachable code, infinite loops, and 
  2852. fall-through cases.  The types bool, int and char are distinct.  Old style 
  2853. declarations are reported.  checks 
  2854.  
  2855. Moderately strict checking.  All checking done by standard, plus must 
  2856. modification checking, rep exposure, return alias, memory management and 
  2857. complete interfaces.  strict 
  2858.  
  2859. Absurdly strict checking.  All checking done by checks, plus modifications and 
  2860. global variables used in unspecified functions, strict standard library, and 
  2861. strict typing of C operators. A special reward will be presented to the first 
  2862. person to produce a real program that produces no errors with strict checking. 
  2863.  
  2864. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2865.  
  2866.  David Evans 
  2867. Systematic Program Development 
  2868. evs@larch.lcs.mit.edu 
  2869.  
  2870.  
  2871. ΓòÉΓòÉΓòÉ 1.13.4. Checking Flags ΓòÉΓòÉΓòÉ
  2872.  
  2873. Checking Flags 
  2874.  
  2875. These flags control checking done by LCLint.  They may be set locally using 
  2876. syntactic comments, from the command line, or in an options file.  Some flags 
  2877. directly control whether a certain class of message is reported. Preceding the 
  2878. flag by + turns reporting on, and preceding the flag by - turns reporting off. 
  2879. Other flags control checking less directly by determining default values (what 
  2880. annotations are implicit), making types equivalent (to prevent certain type 
  2881. errors), controlling representation access, etc.  For these flags, the effect 
  2882. of + is described, and the effect of - is the opposite (or explicitly explained 
  2883. if there is no clear opposite).  The organization of this section mirrors 
  2884. Sections 3-10. 
  2885.  
  2886. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2887.  
  2888.  David Evans 
  2889. Systematic Program Development 
  2890. evs@larch.lcs.mit.edu 
  2891.  
  2892.  
  2893. ΓòÉΓòÉΓòÉ 1.13.4.1. Key ΓòÉΓòÉΓòÉ
  2894.  
  2895. Key 
  2896.  
  2897. Under each flag name is a flag descriptor encoding the what kind of flag it is 
  2898. and its default value.  The descriptions are: 
  2899.  
  2900.  plain: - 
  2901.  
  2902. A plain flag.  The value after the colon gives the default setting (e.g., this 
  2903. flag is off.)  m: --++ 
  2904.  
  2905. A mode checking flag.  The value of the flag is set by the mode selector.  The 
  2906. four signs give the setting in the weak, standard, checks and strict modes. 
  2907. (e.g., this flag is off in the weak and standard modes, and on in the checks 
  2908. and strict modes.)  shortcut 
  2909.  
  2910. A shortcut flag.  This flag sets other flags, so it has no default value. 
  2911.  
  2912. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2913.  
  2914.  David Evans 
  2915. Systematic Program Development 
  2916. evs@larch.lcs.mit.edu 
  2917.  
  2918.  
  2919. ΓòÉΓòÉΓòÉ 1.13.4.2. Types ΓòÉΓòÉΓòÉ
  2920.  
  2921. Types 
  2922.  
  2923. Abstract Types 
  2924.  
  2925. plain: - 
  2926. impabstract 
  2927.  
  2928. Implicit abstract annotation for type declarations that do not use concrete. 
  2929.  
  2930. m: -+++ 
  2931. mutrep 
  2932.  
  2933. Representation of mutable type has sharing semantics. 
  2934.  
  2935. Access (Section 3.1) 
  2936.  
  2937. plain: + 
  2938. accessmodule 
  2939.  
  2940. An abstract type defined in M.h (or specified in M.lcl) is accessible in M.c. 
  2941.  
  2942. plain: + 
  2943. accessfile 
  2944.  
  2945. An abstract type named type is accessible in files named type.<extenstion>. 
  2946.  
  2947. plain: + 
  2948. accessczech 
  2949.  
  2950. An abstract type named type may be accessible in a function named type_name. 
  2951. (see Section 9.1.1) 
  2952.  
  2953. plain: - 
  2954. accessslovak 
  2955.  
  2956. An abstract type named type may be accessible in a function named typeName. 
  2957. (see Section.9.1.2) 
  2958.  
  2959. plain: - 
  2960. accessczechoslovak 
  2961.  
  2962. An abstract type named type may be accessible in a function named type_name or 
  2963. typeName.  (see Section 9.1.3) 
  2964.  
  2965. shortcut 
  2966. accessall 
  2967.  
  2968. Sets accessmodule, accessfile and accessczech. 
  2969.  
  2970. Boolean Types (Section 3.3) 
  2971.  
  2972. These flags control the type name used to represent booleans, and whether the 
  2973. boolean type is abstract. 
  2974.  
  2975. plain: - 
  2976. bool 
  2977.  
  2978. Boolean type is an abstract type. 
  2979.  
  2980. plain: bool 
  2981.  booltype <name> 
  2982.  
  2983. Set name of boolean type to <name>. 
  2984.  
  2985. plain: FALSE 
  2986.  boolfalse <name> 
  2987.  
  2988. Set name of boolean false to <name>. 
  2989.  
  2990. plain: TRUE 
  2991.  booltrue <name> 
  2992.  
  2993. Set name of boolean true to <name>. 
  2994.  
  2995. Predicates 
  2996.  
  2997. m: --++ 
  2998. predboolptr 
  2999.  
  3000. Type of condition test is a pointer. 
  3001.  
  3002. m: -+++ 
  3003. predboolint 
  3004.  
  3005. Type of condition test is an integral type. 
  3006.  
  3007. m: ++++ 
  3008. predboolothers 
  3009.  
  3010. Type of condition test is not a boolean, pointer or integral type. 
  3011.  
  3012. shortcut 
  3013. predbool 
  3014.  
  3015. Sets predboolint, predboolptr and preboolothers. 
  3016.  
  3017. plain: + 
  3018. predassign 
  3019.  
  3020. The condition test is an assignment expression. If an assignment is intended, 
  3021. add an extra    parentheses nesting (e.g., if ((a = b)) ...). 
  3022.  
  3023. Primitive Operations 
  3024.  
  3025. m: ---+ 
  3026. ptrarith 
  3027.  
  3028. Arithmetic involving pointer and integer. 
  3029.  
  3030. m: ++-- 
  3031. ptrnegate 
  3032.  
  3033. Allow the operand of the ! operator to be a pointer. 
  3034.  
  3035.  m: ---+ 
  3036. bitwisesigned 
  3037.  
  3038. An operand to a bitwise operator is not an unsigned values.  This may have 
  3039. unexpected results depending on the signed representations. 
  3040.  
  3041.  m: -+++ 
  3042. shiftsigned 
  3043.  
  3044. An operand to a shift operator is not unsigned values.  This may have 
  3045. unexpected results depending on the signed representations. 
  3046.  
  3047.  m: ---+ 
  3048. strictops 
  3049.  
  3050. Primitive operation does not type check strictly. 
  3051.  
  3052. m: ---+ 
  3053. sizeoftype 
  3054.  
  3055. Operand of sizeof operator is a type.  (Safer to use expression, int *x = 
  3056. sizeof (*x); instead of sizeof (int).) 
  3057.  
  3058. Format Codes 
  3059.  
  3060. plain: + 
  3061. formatcode 
  3062.  
  3063. Invalid format code in format string for printflike or scanflike function. 
  3064.  
  3065. plain: + 
  3066. formattype 
  3067.  
  3068. Type-mismatch in parameter corresponding to format code in a printflike or 
  3069. scanflike function. 
  3070.  
  3071. Main 
  3072.  
  3073. plain: + 
  3074. maintype 
  3075.  
  3076. Type of main does not match expected type (function returning an int, taking no 
  3077. parameters or two parameters of type int and char **.) 
  3078.  
  3079. Comparisons 
  3080.  
  3081.  m: -+++ 
  3082. boolcompare 
  3083.  
  3084. Comparison between boolean values.  This is dangerous since there may be 
  3085. multiple TRUE values if any non-zero value is interpreted at TRUE. 
  3086.  
  3087. m: -+++ 
  3088. realcompare 
  3089.  
  3090. Comparison involving float or double values.  This is dangerous since it may 
  3091. produce unexpected results because floating point representations are inexact. 
  3092.  
  3093. m: -+++ 
  3094. ptrcompare 
  3095.  
  3096. Comparison between pointer and number. 
  3097.  
  3098. Type Equivalence 
  3099.  
  3100. m: +--- 
  3101. voidabstract 
  3102.  
  3103. Allow void * to match pointers to abstract types.  (Casting a pointer to an 
  3104. abstract type to a pointer to void is okay if +voidabstract is set.) 
  3105.  
  3106. plain: + 
  3107.  castfcnptr 
  3108.  
  3109.  A pointer to a function is cast to (or used as) a pointer to void (or vice 
  3110. versa). 
  3111.  
  3112. m: +--- 
  3113. forwarddecl 
  3114.  
  3115. Forward declarations of pointers to abstract representation match abstract 
  3116. type. 
  3117.  
  3118.  m: -+++ 
  3119. imptype 
  3120.  
  3121. A variable declaration has no explicit type.  The type is implicitly int. 
  3122.  
  3123.  m: + 
  3124. incompletetype 
  3125.  
  3126. A formal parameter is declared with an incomplete type (e.g., int[][]). 
  3127.  
  3128.  m: +--- 
  3129. charindex 
  3130.  
  3131. Allow char to index arrays. 
  3132.  
  3133. m: ---- 
  3134. enumindex 
  3135.  
  3136. Allow members of enum type  to index arrays. 
  3137.  
  3138. m: +--- 
  3139. boolint 
  3140.  
  3141. Make bool and int types equivalent.  (No type errors are reported when a 
  3142. boolean is used where an integral type is expected and vice versa.) 
  3143.  
  3144. m: +--- 
  3145. charint 
  3146.  
  3147. Make char and int types equivalent. 
  3148.  
  3149. m: ++-- 
  3150. enumint 
  3151.  
  3152. Make enum and int types equivalent. 
  3153.  
  3154. m: +--- 
  3155. floatdouble 
  3156.  
  3157. Make float and double types equivalent. 
  3158.  
  3159. m: ---- 
  3160. ignorequals 
  3161.  
  3162. Ignore type qualifiers (long, short, unsigned ). 
  3163.  
  3164. m: ++-- 
  3165. relaxquals 
  3166.  
  3167. Report qualifier mismatches only if dangerous (information may be lost since a 
  3168. larger type is assigned to (or passed as) a smaller one or a comparison uses 
  3169. signed and unsigned values.) 
  3170.  
  3171. m: ---- 
  3172. ignoresigns 
  3173.  
  3174. Ignore signs in type comparisons (unsigned matches signed). 
  3175.  
  3176. plain: - 
  3177.  longintegral 
  3178.  
  3179. Allow long type to match an arbitrary integral type (e.g., size_t). 
  3180.  
  3181. m: +--- 
  3182.  longunsignedintegral 
  3183.  
  3184. Allow long unsigned type to match an arbitrary integral type (e.g., dev_t). 
  3185.  
  3186. plain: - 
  3187.  matchanyintegral 
  3188.  
  3189. Allow any integral type to match an arbitrary integral type (e.g., dev_t). 
  3190.  
  3191.  m: +--- 
  3192.  long-unsigned-unsigned-integral 
  3193.  
  3194. Allow unsigned long type to match an arbitrary unsigned integral type (e.g., 
  3195. size_t). 
  3196.  
  3197. m: +--- 
  3198.  long-signed-integral 
  3199.  
  3200. Allow long type to match an arbitrary signed integral type (e.g., ssize_t).  m: 
  3201. ++++ 
  3202. num-literal 
  3203.  
  3204. Integer literals can be used as floats. 
  3205.  
  3206. plain: + 
  3207.  char-int-literal 
  3208.  
  3209. A character constant may be used as an int. 
  3210.  
  3211. m: ++++ 
  3212. zeroptr 
  3213.  
  3214. Literal 0 may be used as a pointer. 
  3215.  
  3216. m: ---- 
  3217. relaxtypes 
  3218.  
  3219. Allow all numeric types to match. 
  3220.  
  3221. plain: + 
  3222. fullinitblock 
  3223.  
  3224. Initializer does not set every field in the structure. 
  3225.  
  3226. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  3227.  
  3228.  David Evans 
  3229. Systematic Program Development 
  3230. evs@larch.lcs.mit.edu 
  3231.  
  3232.  
  3233. ΓòÉΓòÉΓòÉ 1.13.4.3. Function Interfaces ΓòÉΓòÉΓòÉ
  3234.  
  3235. Function Interfaces 
  3236.  
  3237. Modification (Section 4.1) 
  3238.  
  3239. m: ++++ 
  3240. modifies 
  3241.  
  3242. Undocumented modification of caller-visible state.  Without +moduncon, 
  3243. modification errors are only reported in the definitions of functions declared 
  3244. with a modifies clause (or specified). 
  3245.  
  3246. m: --++ 
  3247. mustmod 
  3248.  
  3249. Documented modification is not detected.  An object listed in the modifies 
  3250. clause for a function, is not modified by the implementation. 
  3251.  
  3252. shortcut 
  3253. mod-uncon 
  3254.  
  3255. Report modification errors in functions declared without a modifies 
  3256. clause.(Sets modnomods, mod-globs-nomods and mod-strict-globs-nomods.) 
  3257.  
  3258. m: ---+ 
  3259. mod-nomods 
  3260.  
  3261. Report modification errors (not involving global variables) in functions 
  3262. declared without a modifies clause. 
  3263.  
  3264. m: ---+ 
  3265. mod-uncon-nomods 
  3266.  
  3267. An unconstrained function is called in a function body where  modifications are 
  3268. checked.  Since the unconstrained function may modify anything, there may be 
  3269. undetected modifications in the checked function. 
  3270.  
  3271. m: ---+ 
  3272. mod-internal-strict 
  3273.  
  3274. A function that modifies internalState is called from a function that does not 
  3275. list internalState in its modifies clause. 
  3276.  
  3277. m: ---+ 
  3278. mod-file-sys 
  3279.  
  3280.  A function modifies the file system but does not list fileSystem in its 
  3281. modifies clause. 
  3282.  
  3283.  Global Variables (Section 4.2) 
  3284.  
  3285. Errors involving the use and modification of global and file static variables 
  3286. are reported depending on flag settings, annotations where the global variable 
  3287. is declared, and whether or not the function where the global is used was 
  3288. declared with a globals clause. 
  3289.  
  3290. m: ++++ 
  3291. globs 
  3292.  
  3293. Undocumented use of a checked global variable in a function with a globals 
  3294. list. 
  3295.  
  3296. m: ++++ 
  3297. globuse 
  3298.  
  3299. A global listed in the globals list is not used in the implementation. 
  3300.  
  3301. m: ---+ 
  3302. globnoglobs 
  3303.  
  3304. Use of a checked global in a function with no globals list. 
  3305.  
  3306. m: ---+ 
  3307. internalglobs 
  3308.  
  3309. Undocumented use of internal state (should have globals internalState). 
  3310.  
  3311. m: ---+ 
  3312. internalglobsnoglobs 
  3313.  
  3314.     Use of internal state in function with no globals list. 
  3315.  
  3316. m: -+++ 
  3317. globstate 
  3318.  
  3319. A function returns with global in inconsistent state (null or undefined) 
  3320.  
  3321. m: --++ 
  3322. allglobs 
  3323.  
  3324. Report use and modification errors for globals not annotated with unchecked. 
  3325.  
  3326. m: ++++ 
  3327. checkstrictglobs 
  3328.  
  3329. Report use and modification errors for checkedstrict globals. 
  3330.  
  3331. Modification of Global Variables 
  3332.  
  3333. m: -+++ 
  3334. modglobs 
  3335.  
  3336. Undocumented modification of a checked global variable. 
  3337.  
  3338. m: ---+ 
  3339. modglobsunchecked 
  3340.  
  3341. Undocumented modification of an unchecked global variable. 
  3342.  
  3343. m: ---+ 
  3344. modglobsnomods 
  3345.  
  3346. Undocumented modification of a checked global variable in a function with no 
  3347. modifies clause. 
  3348.  
  3349. m: ---+ 
  3350. modstrictglobsnomods 
  3351.  
  3352. Undocumented modification of a checkedstrict global variable in a function 
  3353. declared with no modifies clause. 
  3354.  
  3355. Globals Lists and Modifies Clauses 
  3356.  
  3357. m: ---+ 
  3358. warnmissingglobs 
  3359.  
  3360. Global variable used in modifies clause is not listed in globals list.  (The 
  3361. global is added to the globals list.) 
  3362.  
  3363. m: ---+ 
  3364. warnmissingglobsnoglobs 
  3365.  
  3366. Global variable used in modifies clause of a function with no globals list. 
  3367.  
  3368. m: --++ 
  3369. globsimpmodsnothing 
  3370.  
  3371. A function declared with a globals list but no modifies clause is assumed to 
  3372. modify nothing. 
  3373.  
  3374. m: ---- 
  3375. modsimpnoglobs 
  3376.  
  3377. A function declared with a modifies clause but no globals list is assumed to 
  3378. use no globals. 
  3379.  
  3380. Implicit Checking Qualifiers 
  3381.  
  3382. m: ---- 
  3383. impcheckedglobs 
  3384.  
  3385. Implicit checked qualifier on global variables with no checking annotation. 
  3386.  
  3387. m: ---- 
  3388. impcheckedstatics 
  3389.  
  3390. Implicit checked qualifier file static scope variables with no checking 
  3391. annotation. 
  3392.  
  3393. m: ---- 
  3394. impcheckmodglobs 
  3395.  
  3396. Implicit checkmod qualifier on global variables with no checking annotation. 
  3397.  
  3398. m: ---- 
  3399. impcheckmodstatics 
  3400.  
  3401. Implicit checkmod qualifier file static scope variables with no checking 
  3402. annotation. 
  3403.  
  3404. m: ---+ 
  3405. impcheckedstrictglobs 
  3406.  
  3407. Implicit checked qualifier on global variables with no checking annotation. 
  3408.  
  3409. m: ---+ 
  3410. impcheckedstrictstatics 
  3411.  
  3412. Implicit checked qualifier file static scope variables with no checking 
  3413. annotation. 
  3414.  
  3415. m: --++ 
  3416. impcheckmodinternals 
  3417.  
  3418. Implicit checkmod qualifier on function scope static variables with no checking 
  3419. annotation. 
  3420.  
  3421. m: -+++ 
  3422. impglobsweak 
  3423.  
  3424. Global Aliasing 
  3425.  
  3426. shortcut 
  3427. globalias 
  3428.  
  3429. Function returns with global aliasing external state (sets 
  3430. checkstrictglobalias, checkedglobalias, checkmodglobalias and 
  3431. uncheckedglobalias). 
  3432.  
  3433. m: -+++ 
  3434. checkstrictglobalias 
  3435.  
  3436. Function returns with a checkstrict global aliasing external state. 
  3437.  
  3438. m: -+++ 
  3439. checkedglobalias 
  3440.  
  3441. Function returns with a checked global aliasing external state. 
  3442.  
  3443. m: -+++ 
  3444. checkmodglobalias 
  3445.  
  3446. Function returns with a checkmod global aliasing external state. 
  3447.  
  3448. m: --++ 
  3449. uncheckedglobalias 
  3450.  
  3451. Function returns with an unchecked global aliasing external state. 
  3452.  
  3453. Declaration Consistency (Section 4.3) 
  3454.  
  3455. m: -+++ 
  3456. incondefs 
  3457.  
  3458. Identifier redeclared or redefined with inconsistent type. 
  3459.  
  3460. m: -+++ 
  3461. incondefslib 
  3462.  
  3463. Identifier defined in a library is redefined with inconsistent type 
  3464.  
  3465. m: ---- 
  3466. overload 
  3467.  
  3468. Standard library function overloaded. 
  3469.  
  3470. m: -+++ 
  3471. matchfields 
  3472.  
  3473. A struct or enum type is redefined with inconsistent fields or members. 
  3474.  
  3475. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  3476.  
  3477.  David Evans 
  3478. Systematic Program Development 
  3479. evs@larch.lcs.mit.edu 
  3480.  
  3481.  
  3482. ΓòÉΓòÉΓòÉ 1.13.4.4. Memory Management ΓòÉΓòÉΓòÉ
  3483.  
  3484. Memory Management 
  3485.  
  3486. Reporting of memory management errors is controlled by flags setting checking 
  3487. and implicit annotations and code annotations. 
  3488.  
  3489. Deallocation Errors (Section 5.2) 
  3490.  
  3491. m: -+++ 
  3492. usereleased 
  3493.  
  3494. Storage used after it may have been released. 
  3495.  
  3496. m: ---+ 
  3497. strictusereleased 
  3498.  
  3499. An array element used after it may have been released. 
  3500.  
  3501. Inconsistent Branches 
  3502.  
  3503. m: -+++ 
  3504. branchstate 
  3505.  
  3506. Storage has inconsistent states of alternate paths through a branch (e.g., it 
  3507. is released in the true branch of an if-statement, but there is no else 
  3508. branch.) 
  3509.  
  3510. m: ---+ 
  3511. strictbranchstate 
  3512.  
  3513. Storage through array fetch has inconsistent states of alternate paths through 
  3514. a branch.  Since array elements are not checked accurately, this may lead to 
  3515. spurious errors. 
  3516.  
  3517. m: --++ 
  3518. deparrays 
  3519.  
  3520. Treat array elements as dependent storage.  Checking of array elements cannot 
  3521. be done accurately by LCLint.  If deparrays is not set, array elements are 
  3522. assumed to be independent, so code that releases the same element more than 
  3523. once will produce no error.  If deparrays is set, array elements are assumed to 
  3524. be dependent, so code that releases the same element more that once will 
  3525. produce an error, but so will code that releases different elements correctly 
  3526. will produce a spurious error. 
  3527.  
  3528. Memory Leaks 
  3529.  
  3530. m: -+++ 
  3531. mustfree 
  3532.  
  3533. Allocated storage was not released before return or scope exit  Errors are 
  3534. reported for only, fresh or owned storage. 
  3535.  
  3536. m: -+++ 
  3537. compdestroy 
  3538.  
  3539. All only references derivable from out only parameter of type void * must be 
  3540. released.  (This is the type of the parameter to free, but may also be used for 
  3541. user-defined deallocation functions.) 
  3542.  
  3543. m: ---+ 
  3544. strictdestroy 
  3545.  
  3546. Report complete destruction errors for array elements that may have been 
  3547. released.  (If strictdestroy is not set, LCLint will assume that if any array 
  3548. element was released, the entire array was correctly released.) 
  3549.  
  3550. Transfer Errors 
  3551.  
  3552. A transfer error is reported when storage is transferred (by an assignment, 
  3553. passing a parameter, or returning) in a way that is inconsistent. 
  3554.  
  3555. shortcut 
  3556. memtrans 
  3557.  
  3558. Sets all memory transfer errors flags. 
  3559.  
  3560. m: -+++ 
  3561. onlytrans 
  3562.  
  3563. Only storage transferred to non-only reference (memory leak). 
  3564.  
  3565. m: -+++ 
  3566. ownedtrans 
  3567.  
  3568. Owned storage transferred to non-owned reference (memory leak). 
  3569.  
  3570. m: -+++ 
  3571. freshtrans 
  3572.  
  3573. Newly-allocated storage transferred to non-only reference (memory leak). 
  3574.  
  3575. m: -+++ 
  3576. sharedtrans 
  3577.  
  3578. Shared storage transferred to non-shared reference. 
  3579.  
  3580. m: -+++ 
  3581. dependenttrans 
  3582.  
  3583. Inconsistent dependent transfer. Dependent storage is transferred to a 
  3584. non-dependent reference. 
  3585.  
  3586. m: -+++ 
  3587. temptrans 
  3588.  
  3589. Temporary storage (associated with a temp formal parameter) is transferred to a 
  3590. non-temporary reference.  The storage may be released or new aliases created. 
  3591.  
  3592. m: -+++ 
  3593. kepttrans 
  3594.  
  3595. Kept storage transferred to non-temporary reference. 
  3596.  
  3597. m: -+++ 
  3598. keeptrans 
  3599.  
  3600. Keep storage is transferred in a way that may add a new alias to it, or release 
  3601. it. 
  3602.  
  3603. m: -+++ 
  3604. refcounttrans 
  3605.  
  3606. Reference counted storage is transferred in an inconsistent way. 
  3607.  
  3608. m: -+++ 
  3609. newreftrans 
  3610.  
  3611. A new reference transferred to a reference counted reference (reference count 
  3612. is not set correctly). 
  3613.  
  3614. m: -+++ 
  3615. immediatetrans 
  3616.  
  3617. An immediate address (result of &) is transferred inconsistently. 
  3618.  
  3619. m: -+++ 
  3620. statictrans 
  3621.  
  3622. Static storage is transferred in an inconsistent way. 
  3623.  
  3624. m: -+++ 
  3625. exposetrans 
  3626.  
  3627. Inconsistent exposure transfer. Exposed storage is transferred to a 
  3628. non-exposed, non-observer reference. 
  3629.  
  3630. m: -+++ 
  3631. observertrans 
  3632.  
  3633. Inconsistent observer transfer. Observer storage is transferred to a 
  3634. non-observer reference. 
  3635.  
  3636. m: -+++ 
  3637. unqualifiedtrans 
  3638.  
  3639. Unqualified storage is transferred in an inconsistent way. 
  3640.  
  3641.  Initializers 
  3642.  
  3643. m: --++ 
  3644.  onlyunqglobaltrans 
  3645.  
  3646.  Only storage transferred to an unqualified global or static reference. This 
  3647. may lead to a memory leak, since the new reference is not necessarily released. 
  3648.  
  3649. m: --++ 
  3650.  staticinittrans 
  3651.  
  3652. Static storage is used as an initial value in an inconsistent way. 
  3653.  
  3654. m: --++ 
  3655.  unqualifiedinittrans 
  3656.  
  3657. Unqualified storage is used as an initial value in an inconsistent way. 
  3658.  
  3659.  Derived Storage 
  3660.  
  3661. m: -+++ 
  3662. compmempass 
  3663.  
  3664. Storage derivable from a parameter does not match the alias kind expected for 
  3665. the formal parameter. 
  3666.  
  3667. Stack References 
  3668.  
  3669. m: ++++ 
  3670. stackref 
  3671.  
  3672. A stack reference is pointed to by an external reference when the function 
  3673. returns.  Since the call frame will be destroyed when the function returns the 
  3674. return value will point to dead storage. (Section 5.2.6) 
  3675.  
  3676. Implicit Memory Annotations (Section 5.3) 
  3677.  
  3678. plain: + 
  3679. globimponly 
  3680.  
  3681. Assume unannotated global storage is only. 
  3682.  
  3683. plain: + 
  3684. paramimptemp 
  3685.  
  3686. Assume unannotated parameter is temp. 
  3687.  
  3688. plain: + 
  3689. retimponly 
  3690.  
  3691. Assume unannotated returned storage is only. 
  3692.  
  3693. plain: + 
  3694. structimponly 
  3695.  
  3696. Assume unannotated structure or union field is only. 
  3697.  
  3698. shortcut 
  3699. codeimponly 
  3700.  
  3701. Sets globimponly, retimponly and structimponly. 
  3702.  
  3703. m: -+++ 
  3704. memimp 
  3705.  
  3706. Report memory errors for unqualified storage. 
  3707.  
  3708. m: ---- 
  3709. passunknown 
  3710.  
  3711. Passing a value as an unannotated parameter clears its annotation.  This will 
  3712. prevent many spurious errors from being report for unannotated programs, but 
  3713. eliminates the possibility of detecting many errors. 
  3714.  
  3715. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  3716.  
  3717.  David Evans 
  3718. Systematic Program Development 
  3719. evs@larch.lcs.mit.edu 
  3720.  
  3721.  
  3722. ΓòÉΓòÉΓòÉ 1.13.4.5. Sharing ΓòÉΓòÉΓòÉ
  3723.  
  3724. Sharing 
  3725.  
  3726. Aliasing (Section 6) 
  3727.  
  3728. m: -+++ 
  3729. aliasunique 
  3730.  
  3731. A actual parameter that is passed as a unique formal parameter is aliased by 
  3732. another parameter or global variable. 
  3733.  
  3734. m: -+++ 
  3735. mayaliasunique 
  3736.  
  3737. A actual parameter that is passed as a unique formal parameter may be aliased 
  3738. by another parameter or global variable. 
  3739.  
  3740. m: -+++ 
  3741. mustnotalias 
  3742.  
  3743. An alias has been added to a temp-qualifier parameter or global that is visible 
  3744. externally when the function returns. 
  3745.  
  3746. m: --++ 
  3747. retalias 
  3748.  
  3749. A function returns an alias to parameter or global. 
  3750.  
  3751. Exposure (Section 6.2) 
  3752.  
  3753. shortcut 
  3754. repexpose 
  3755.  
  3756. The internal representation of an abstract type is visible to the caller.  This 
  3757. means clients may have access to a pointer into the abstract representation. 
  3758. (Sets assignexpose, retexpose, and castexpose.) 
  3759.  
  3760. m: --++ 
  3761. assignexpose 
  3762.  
  3763. Abstract representation is exposed by an assignment or passed parameter. 
  3764.  
  3765. m: --++ 
  3766. castexpose 
  3767.  
  3768. Abstract representation is exposed through a cast. 
  3769.  
  3770. m: --++ 
  3771. retexpose 
  3772.  
  3773. Abstract representation is exposed by a return value. 
  3774.  
  3775. Observer Modifications 
  3776.  
  3777. plain: + 
  3778. modobserver 
  3779.  
  3780. Possible modification of observer storage. 
  3781.  
  3782. m: ---+ 
  3783. modobserveruncon 
  3784.  
  3785. Storage declared with observer may be modified through a call to an 
  3786. unconstrained function. 
  3787.  
  3788. String Literals  (Section 6.2.1) 
  3789.  
  3790. m: --++ 
  3791. readonlytrans 
  3792.  
  3793. Report memory transfer errors for initializations to read-only string literals 
  3794.  
  3795. m: -+++ 
  3796. readonlystrings 
  3797.  
  3798. String literals are read-only (ANSI semantics).  An error is reported if a 
  3799. string literal may be modified or released. 
  3800.  
  3801. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  3802.  
  3803.  David Evans 
  3804. Systematic Program Development 
  3805. evs@larch.lcs.mit.edu 
  3806.  
  3807.  
  3808. ΓòÉΓòÉΓòÉ 1.13.4.6. Use Before Definition ΓòÉΓòÉΓòÉ
  3809.  
  3810. Use Before Definition (Section 7.1) 
  3811.  
  3812. m: -+++ 
  3813. usedef 
  3814.  
  3815. The value of a location that may not be initialized on some execution path is 
  3816. used. 
  3817.  
  3818. m: ---- 
  3819. impouts 
  3820.  
  3821. Allow unannotated pointer parameters to functions to be implicit out 
  3822. parameters. 
  3823.  
  3824. m: -+++ 
  3825. compdef 
  3826.  
  3827. Storage derivable from a parameter, return value or global variable is not 
  3828. completely defined. 
  3829.  
  3830. m: -+++ 
  3831. uniondef 
  3832.  
  3833. No field of a union is defined.  (No error is reported if at least one union 
  3834. field is defined.) 
  3835.  
  3836. m: -+++ 
  3837. mustdefine 
  3838.  
  3839. Parameter declared with out is not defined before return or scope exit. 
  3840.  
  3841. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  3842.  
  3843.  David Evans 
  3844. Systematic Program Development 
  3845. evs@larch.lcs.mit.edu 
  3846.  
  3847.  
  3848. ΓòÉΓòÉΓòÉ 1.13.4.7. Null Pointers ΓòÉΓòÉΓòÉ
  3849.  
  3850. Null Pointers (Section 7.2) 
  3851.  
  3852.  m: -+++ 
  3853. nullderef 
  3854.  
  3855. A possibly null pointer may be dereferenced. 
  3856.  
  3857. m: -+++ 
  3858. nullpass 
  3859.  
  3860. A possibly null pointer is passed as a parameter not annotated with null. 
  3861.  
  3862. m: -+++ 
  3863. nullret 
  3864.  
  3865. A possibly null pointer is return as a result not annotated with null. 
  3866.  
  3867. m: -+++ 
  3868. nullstate 
  3869.  
  3870. Possibly null pointer reachable from a reference with no null annotation. 
  3871.  
  3872. m: -+++ 
  3873. nullassign 
  3874.  
  3875. Inconsistent assignment or initialization involving null pointer. 
  3876.  
  3877. shortcut 
  3878. null 
  3879.  
  3880. Sets all null checking flags. 
  3881.  
  3882. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  3883.  
  3884.  David Evans 
  3885. Systematic Program Development 
  3886. evs@larch.lcs.mit.edu 
  3887.  
  3888.  
  3889. ΓòÉΓòÉΓòÉ 1.13.4.8. Macros ΓòÉΓòÉΓòÉ
  3890.  
  3891. Macros (Section 8) 
  3892.  
  3893. These flags control expansion and checking of macro definitions and 
  3894. invocations. 
  3895.  
  3896. Macro Expansion 
  3897.  
  3898. These flags control which macros are checked as functions or constants, and 
  3899. which are expanded in the pre-processing phase.  Macros preceded by 
  3900. /*@notfunction@*/ are never expanded regardless of these flag settings.  These 
  3901. flags may be used in source-file control comments. 
  3902.  
  3903. plain: - 
  3904. fcnmacros 
  3905.  
  3906. Macros defined with parameter lists are not expanded and are checked as 
  3907. functions. 
  3908.  
  3909. plain: - 
  3910. constmacros 
  3911.  
  3912. Macros defined without parameter lists are not expanded and are checked as 
  3913. constants. 
  3914.  
  3915. shortcut 
  3916. allmacros 
  3917.  
  3918. Sets allfcnmacros and allconstmacros. 
  3919.  
  3920. plain: - 
  3921. libmacros 
  3922.  
  3923. Macros defining identifiers declared in a loaded library are not expanded and 
  3924. are checked according to the library information. 
  3925.  
  3926. Macro Definitions 
  3927.  
  3928. These flags control what errors are reported in macro definitions. 
  3929.  
  3930. m: -+++ 
  3931. macrostmt 
  3932.  
  3933. Macro definition is not syntactically equivalent to function.  This means if 
  3934. the macro is used as a statement (e.g., if (test) macro();) unexpected behavior 
  3935. may result.  One fix is to surround the macro body with do { ...; } while 
  3936. (FALSE). 
  3937.  
  3938. m: -+++ 
  3939. macroparams 
  3940.  
  3941. A macro parameter is not used exactly once in all possible invocations of the 
  3942. macro. 
  3943.  
  3944. m: -+++ 
  3945. macroassign 
  3946.  
  3947. A macro parameter is used as the left side of an assignment expression. 
  3948.  
  3949. m: -+++ 
  3950. macroparens 
  3951.  
  3952. A macro parameter is used without parentheses (in potentially dangerous 
  3953. context). 
  3954.  
  3955. m: ---+ 
  3956. macroempty 
  3957.  
  3958. Macro definition of a function is empty. 
  3959.  
  3960. m: -+++ 
  3961. macroredef 
  3962.  
  3963. Macro is redefined.  There is another macro defined with the same name. 
  3964.  
  3965. m: -+++ 
  3966. macrounrecog 
  3967.  
  3968. An unrecognized identifier appears in a macro definition.  Since the identifier 
  3969. may be defined where the macro is used, this could be okay, but LCLint will not 
  3970. be able to check the unrecognized identifier appropriately. 
  3971.  
  3972. Corresponding Declarations 
  3973.  
  3974. m: ++++ 
  3975. macromatchname 
  3976.  
  3977. A iter or constant macro is defined using a different name from the one used in 
  3978. the previous syntactic comment. 
  3979.  
  3980. shortcut 
  3981. macrodecl 
  3982.  
  3983. A macro definition has no corresponding declaration.  (Sets macrofcndecl and 
  3984. macroconstdecl.) 
  3985.  
  3986. m: -+++ 
  3987. macrofcndecl 
  3988.  
  3989. Macro definition with parameter list has no corresponding function prototype. 
  3990. Without a prototype, the types of the macro result and parameters is unknown. 
  3991.  
  3992. m: -+++ 
  3993. macroconstdecl 
  3994.  
  3995. A macro definition without parameter list has no corresponding constant 
  3996. declaration. 
  3997.  
  3998. plain: + 
  3999. nextlinemacros 
  4000.  
  4001. A constant or iter declaration is not immediately followed by a macro 
  4002. definition. 
  4003.  
  4004. Side-Effect Free Parameters (Section 8.2.1) 
  4005.  
  4006. These flags control error reporting for parameters with inconsistent 
  4007. side-effects in invocations of checked function macros and function calls. 
  4008.  
  4009. m: -+++ 
  4010. sefparams 
  4011.  
  4012. An actual parameter with side-effects is passed as a formal parameter declared 
  4013. with sef. 
  4014.  
  4015. m: --++ 
  4016. sefuncon 
  4017.  
  4018. An actual parameter involving a call to an unconstrained function (declared 
  4019. without modifies clause) that may modify anything is passed as a sef parameter. 
  4020.  
  4021. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  4022.  
  4023.  David Evans 
  4024. Systematic Program Development 
  4025. evs@larch.lcs.mit.edu 
  4026.  
  4027.  
  4028. ΓòÉΓòÉΓòÉ 1.13.4.9. Iterators ΓòÉΓòÉΓòÉ
  4029.  
  4030. Iterators 
  4031.  
  4032. plain: - 
  4033. hasyield 
  4034.  
  4035. An iterator has been declared with no parameters annotated with yield. 
  4036.  
  4037. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  4038.  
  4039.  David Evans 
  4040. Systematic Program Development 
  4041. evs@larch.lcs.mit.edu 
  4042.  
  4043.  
  4044. ΓòÉΓòÉΓòÉ 1.13.4.10. Naming Conventions ΓòÉΓòÉΓòÉ
  4045.  
  4046. Naming Conventions 
  4047.  
  4048. plain: + 
  4049. namechecks 
  4050.  
  4051.  Turns all name checking on or off without changing other settings. 
  4052.  
  4053. Type-Based Naming Conventions (Section 9.1) 
  4054.  
  4055. Czech Naming Convention 
  4056.  
  4057. shortcut 
  4058. czech 
  4059.  
  4060. Selects complete Czech naming convention (sets accessczech, czechfcns, 
  4061. czechvars, czechconsts, czechmacros, and czechtypes). 
  4062.  
  4063. plain: + 
  4064. accessczech 
  4065.  
  4066. Allow access to abstract types following Czech naming convention.  The 
  4067. representation of an abstract type named t is accessible in the definition of a 
  4068. function or constant named t_name. 
  4069.  
  4070. plain: - 
  4071. czechfcns 
  4072.  
  4073. Function or iterator name is not consistent with Czech naming convention. 
  4074.  
  4075. plain: - 
  4076. czechvars 
  4077.  
  4078.  Variable name is not consistent with Czech naming convention. 
  4079.  
  4080. plain: - 
  4081. czechmacros 
  4082.  
  4083.  Expanded macro name is not consistent with Czech naming convention. 
  4084.  
  4085. plain: - 
  4086. czechconsts 
  4087.  
  4088. Constant name is not consistent with Czech naming convention. 
  4089.  
  4090. plain: - 
  4091. czechtypes 
  4092.  
  4093.  Type name is not consistent with Czech naming convention.  Czech type names 
  4094. must not use the underscore character. 
  4095.  
  4096. Slovak Naming Convention 
  4097.  
  4098. shortcut 
  4099. slovak 
  4100.  
  4101. Selects complete Slovak naming convention (sets accessslovak, slovakfcns, 
  4102. slovakvars, slovakconsts, slovakmacros,  and slovaktypes). 
  4103.  
  4104. plain: - 
  4105. accessslovak 
  4106.  
  4107. Allow access to abstract types following Slovak naming convention. The 
  4108. representation of an abstract type named t is accessible in the definition of a 
  4109. function or constant named tName. 
  4110.  
  4111. plain: - 
  4112. slovakfcns 
  4113.  
  4114. Function or iterator name is not consistent with Slovak naming convention. 
  4115.  
  4116. plain: - 
  4117. slovakmacros 
  4118.  
  4119. Expanded macro name is not consistent with Slovak naming convention. 
  4120.  
  4121. plain: - 
  4122. slovakvars 
  4123.  
  4124.  Variable name is not consistent with Slovak naming convention. 
  4125.  
  4126. plain: - 
  4127. slovakconsts 
  4128.  
  4129.  Constant name is not consistent with Slovak naming convention. 
  4130.  
  4131. plain: - 
  4132. slovaktypes 
  4133.  
  4134. Type name is not consistent with Slovak naming convention.  Slovak type names 
  4135. may not include uppercase letters. 
  4136.  
  4137. Czechoslovak Naming Convention 
  4138.  
  4139. shortcut 
  4140. czechoslovak 
  4141.  
  4142. Selects complete Czechoslovak naming convention (sets accessczechoslovak, 
  4143. czechoslovakfcns, czechoslovakvars, czechoslovakconsts, czechoslovakmacros, and 
  4144. czechoslovaktypes). 
  4145.  
  4146. plain: - 
  4147. accessczechoslovak 
  4148.  
  4149. Allow access to abstract types by Czechoslovak naming convention. The 
  4150. representation of an abstract type named t is accessible in the definition of a 
  4151. function or constant named t_name or tName. 
  4152.  
  4153. plain: - 
  4154. czechoslovakfcns 
  4155.  
  4156.  Function name is not consistent with Czechoslovak naming convention. 
  4157.  
  4158. plain: - 
  4159. czechoslovakmacros 
  4160.  
  4161. Expanded macro name is not consistent with Czechoslovak naming convention. 
  4162.  
  4163. plain: - 
  4164. czechoslovakvars 
  4165.  
  4166.  Variable name is not consistent with Czechoslovak naming convention. 
  4167.  
  4168. plain: - 
  4169. czechoslovakconsts 
  4170.  
  4171.  Constant name is not consistent with Czechoslovak naming convention. 
  4172.  
  4173. plain: - 
  4174. czechoslovaktypes 
  4175.  
  4176.  Type name is not consistent with Czechoslovak naming convention. Czechoslovak 
  4177. type names may not include uppercase letters or the underscore character. 
  4178.  
  4179. Namespace Prefixes  (Section 9.2) 
  4180.  
  4181.  macrovarprefix <prefix string> 
  4182.  
  4183. Set namespace prefix for variables declared in a macro body.  (Default is m_.) 
  4184.  
  4185. plain: + 
  4186. macrovarprefixexclude 
  4187.  
  4188. A variable declared outside a macro body starts with the macrovarprefix. 
  4189.  
  4190.  tagprefix <prefix string> 
  4191.  
  4192. Set namespace prefix of struct, union or enum tag identifiers. 
  4193.  
  4194. plain: - 
  4195. tagprefixexclude 
  4196.  
  4197.  An identifier that is not a tag starts with the tagprefix. 
  4198.  
  4199.  enumprefix <prefix string> 
  4200.  
  4201. Set namespace prefix for enum members. 
  4202.  
  4203. plain: - 
  4204. enumprefixexclude 
  4205.  
  4206.  An identifier that is not an enum member starts with the enumprefix. 
  4207.  
  4208.  filestaticprefix <prefix string> 
  4209.  
  4210. Set namespace prefix for file static declarations. 
  4211.  
  4212. plain: - 
  4213. filestaticprefixexclude 
  4214.  
  4215. An identifier that is not file static starts with the filestaticprefix. 
  4216.  
  4217.  globalprefix <prefix string> 
  4218.  
  4219. Set namespace prefix for global variables. 
  4220.  
  4221. plain: - 
  4222. globalprefixexclude 
  4223.  
  4224. An identifier that is not a global variable starts with the globalprefix. 
  4225.  
  4226.  typeprefix <prefix string> 
  4227.  
  4228. Set namespace prefix for user-defined types. 
  4229.  
  4230. plain: - 
  4231. typeprefixexclude 
  4232.  
  4233. An identifier that is not a type name starts with the typeprefix. 
  4234.  
  4235.  externalprefix <prefix string> 
  4236.  
  4237. Set namespace prefix for external identifiers. 
  4238.  
  4239. plain: - 
  4240. externalprefixexclude 
  4241.  
  4242. An identifier that is not external starts with the externalprefix. 
  4243.  
  4244.  localprefix <prefix string> 
  4245.  
  4246. Set namespace prefix for local variables. 
  4247.  
  4248. plain: - 
  4249. localprefixexclude 
  4250.  
  4251.  An identifier that is not a local variable starts with the localprefix. 
  4252.  
  4253.  uncheckedmacroprefix <prefix string> 
  4254.  
  4255. Set namespace prefix for unchecked macros. 
  4256.  
  4257. plain: - 
  4258. uncheckedmacroprefixexclude 
  4259.  
  4260. An identifier that is not the name of an unchecked macro starts with the 
  4261. uncheckedmacroprefix. 
  4262.  
  4263.  constprefix <prefix string> 
  4264.  
  4265. Set namespace prefix for constants. 
  4266.  
  4267. plain: - 
  4268. constprefixexclude 
  4269.  
  4270. An identifier that is not a constant starts with the constantprefix. 
  4271.  
  4272.  iterprefix <prefix string> 
  4273.  
  4274. Set namespace prefix for iterators. 
  4275.  
  4276. plain: - 
  4277. iterprefixexclude 
  4278.  
  4279. An identifier that is not a iter starts with the iterprefix. 
  4280.  
  4281.  proto-param-prefix <prefix string> 
  4282.  
  4283. Set namespace prefix for parameters in function prototypes. 
  4284.  
  4285.  plain: - 
  4286. proto-param-prefix-exclude 
  4287.  
  4288. An identifier that is not a parameter in a function prototype starts with the 
  4289. protoprarmprefix. 
  4290.  
  4291.  m: --++ 
  4292.  proto-param-name 
  4293.  
  4294. A parameter in a function prototype has a name (can interfere with macro 
  4295. definitions). 
  4296.  
  4297.  m: ---+ 
  4298.  proto-param-match 
  4299.  
  4300.  The name of a parameter in a function definition does not match the 
  4301. corresponding name of the parameter in a function prototype (after removing the 
  4302. protoparamprefix). 
  4303.  
  4304.  Naming Restrictions  (Section 9.3) 
  4305.  
  4306. m: -+++ 
  4307. shadow 
  4308.  
  4309. Declaration reuses name visible in outer scope. 
  4310.  
  4311. Reserved Names 
  4312.  
  4313. m: --++ 
  4314. ansi-reserved 
  4315.  
  4316. External name conflicts with name reserved for the compiler or standard 
  4317. library. 
  4318.  
  4319. m: ---+ 
  4320. ansi-reserved-internal 
  4321.  
  4322.  Internal name conflicts with name reserved for the compiler or standard 
  4323. library. 
  4324.  
  4325.  m: --++ 
  4326. cpp-names 
  4327.  
  4328. Internal or external name conflicts with a C++ reserved word.  (Will cause 
  4329. problems if program is compiled with a C++ compiler.) 
  4330.  
  4331.  Distinct External Names 
  4332.  
  4333. plain: - 
  4334. distinct-external-names 
  4335.  
  4336. An external name is not distinguishable from another external name using 
  4337. externalnamelen significant characters. 
  4338.  
  4339.  external-name-len<number> 
  4340.  
  4341. Sets the number of significant characters in an external name (ANSI default 
  4342. minimum is 6).  Sets +distinctexternalnames. 
  4343.  
  4344. plain: - 
  4345. external-name-case-insensitive 
  4346.  
  4347. Make alphabetic case insignificant in external names.  According to ANSI 
  4348. standard, case need not be significant in an external name.  If 
  4349. +distinctexternalnames is not set, sets +distinctexternalnames  with unlimited 
  4350. external name length. 
  4351.  
  4352. Distinct Internal Names 
  4353.  
  4354. m: ---- 
  4355. distinct-internal-names 
  4356.  
  4357. An internal name is not distinguishable from another internal name using 
  4358. internalnamelen significant characters.  (Also effected by 
  4359. internalnamecaseinsensitive and internalnamelookalike.) 
  4360.  
  4361.  internal-name-len <number> 
  4362.  
  4363. Set the number of significant characters in an internal name. Sets 
  4364. +distinctinternalnames. 
  4365.  
  4366. plain: - 
  4367. internal-name-case-insensitive 
  4368.  
  4369. Set whether case is significant an internal names (-internalnamecaseinsensitive 
  4370. means case is significant).  If +distinctinternalnames is not set, sets 
  4371. +distinct-internal-names with unlimited internal name length. 
  4372.  
  4373. plain: - 
  4374. internalnamelookalike 
  4375.  
  4376.  Set whether similar looking characters (e.g., "1" and "l") match in internal 
  4377. names. 
  4378.  
  4379. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  4380.  
  4381.  David Evans 
  4382. Systematic Program Development 
  4383. evs@larch.lcs.mit.edu 
  4384.  
  4385.  
  4386. ΓòÉΓòÉΓòÉ 1.13.4.11. Other Checks ΓòÉΓòÉΓòÉ
  4387.  
  4388. Other Checks 
  4389.  
  4390. Undefined Evaluation Order  (Section 10.1) 
  4391.  
  4392. m: -+++ 
  4393. evalorder 
  4394.  
  4395. Behavior of an expression is undefined because sub-expressions contain 
  4396. interfering side effects that may be evaluated in any order. 
  4397.  
  4398. m: ---+ 
  4399. evalorderuncon 
  4400.  
  4401. An expression may be undefined because a sub-expression contains a call to an 
  4402. unconstrained function (no modifies clause) that may modify something that may 
  4403. be modified or used by another sub-expression. 
  4404.  
  4405. Problematic Control Structures (Section 10.2) 
  4406.  
  4407. m: -+++ 
  4408.  infloops 
  4409.  
  4410. Likely infinite loop is detected (Section 10.2.1). 
  4411.  
  4412. m: --++ 
  4413.  infloopsuncon 
  4414.  
  4415. Likely infinite loop is detected.  Loop test or body calls an unconstrained 
  4416. function, that may produce an undetected modification. 
  4417.  
  4418. m: ---+ 
  4419. elseifcomplete 
  4420.  
  4421. There is no final else following an else if construct (Section 10.2.5). 
  4422.  
  4423. m: -+++ 
  4424. casebreak 
  4425.  
  4426. These is a non-empty case in a switch not followed by a break (Section 10.2.2). 
  4427.  
  4428. m: -+++ 
  4429. misscase 
  4430.  
  4431. A switch on an enum type is missing a case for a member of the enumerator. 
  4432.  
  4433. m: ---- 
  4434. loopexec 
  4435.  
  4436. Assume all loops execute at least once.  This effects use-before-definition and 
  4437. memory checking.  It should probably not be used globally, but may be used 
  4438. surrounding a particular loop that is known to always execute to prevent 
  4439. spurious messages. 
  4440.  
  4441. Deep Break  (Section 10.2.3) 
  4442.  
  4443. shortcut 
  4444. deepbreak 
  4445.  
  4446. Report errors for break statements inside a nested while, for or switch.  (Sets 
  4447. all nested break and continue flags.) 
  4448.  
  4449. m: --++ 
  4450. looploopbreak 
  4451.  
  4452. There is a break inside a while, for or iterator loop that is inside a while, 
  4453. for or iterator loop. Mark with /*@innerbreak@*/ to suppress the message. 
  4454.  
  4455. m: --++ 
  4456. switchloopbreak 
  4457.  
  4458. There is a break inside a while, for or iterator loop that is inside a switch 
  4459. statement.  Mark with /*@loopbreak@*/. 
  4460.  
  4461. m: ---+ 
  4462. loopswitchbreak 
  4463.  
  4464. There is a break inside a switch statement that is inside a while, for or 
  4465. iterator loop.  Mark with /*@switchbreak@*/. 
  4466.  
  4467. m: ---+ 
  4468. switchswitchbreak 
  4469.  
  4470. There is a break inside a switch statement that is inside another switch 
  4471. statement.  Mark with  /*@innerbreak@*/. 
  4472.  
  4473. m: ---+ 
  4474. looploopcontinue 
  4475.  
  4476. There is a continue inside a while, for or iterator loop that is inside a 
  4477. while, for or iterator loop.  Mark with /*@innercontinue@*/. 
  4478.  
  4479. Loop and if Bodies  (Section 10.2.4) 
  4480.  
  4481. shortcut 
  4482. allempty 
  4483.  
  4484. An if, while or for statement has no body (sets ifempty, whileempty and 
  4485. forempty.) 
  4486.  
  4487. shortcut 
  4488. allblock 
  4489.  
  4490. The body of an if, while or for statement is not a block (sets ifblock, 
  4491. whileblock and forblock.) 
  4492.  
  4493. m: --++ 
  4494. whileempty 
  4495.  
  4496. A while statement has no body. 
  4497.  
  4498. m: ---+ 
  4499. whileblock 
  4500.  
  4501.  The body of a while statement is not a block 
  4502.  
  4503. m: ---+ 
  4504. forempty 
  4505.  
  4506. A for statement has no body. 
  4507.  
  4508. m: ---+ 
  4509. forblock 
  4510.  
  4511. The body of a for statement is not a block. 
  4512.  
  4513. m: ++++ 
  4514. ifempty 
  4515.  
  4516. An if statement has no body. 
  4517.  
  4518. m: ---+ 
  4519. ifblock 
  4520.  
  4521. The body of an if statement is not a block. 
  4522.  
  4523. Suspicious Statements  (Section 10.3) 
  4524.  
  4525. m: -+++ 
  4526. unreachable 
  4527.  
  4528. Code is not reached on any possible execution. 
  4529.  
  4530. m: -+++ 
  4531. noeffect 
  4532.  
  4533. Statement has no effect. 
  4534.  
  4535. m: ---+ 
  4536. noeffectuncon 
  4537.  
  4538. Statement involving call to unconstrained function may have no effect. 
  4539.  
  4540. m: -+++ 
  4541. noret 
  4542.  
  4543. There is a path with no return in a function declared to return a non-void 
  4544. value. 
  4545.  
  4546. Ignored Return Values  (Section 10.3.2) 
  4547.  
  4548. These flags control when errors are reported for function calls that do not use 
  4549. the return value.  Casting the function call to void or declaring the called 
  4550. function to return /*@alt void@*/. 
  4551.  
  4552. m: -+++ 
  4553. retvalbool 
  4554.  
  4555. Return value of type bool ignored. 
  4556.  
  4557. m: -+++ 
  4558. retvalint 
  4559.  
  4560. Return value of type int ignored. 
  4561.  
  4562. m: ++++ 
  4563. retvalother 
  4564.  
  4565. Return value of type other than bool or int ignored. 
  4566.  
  4567. shortcut 
  4568. retval 
  4569.  
  4570. Return value ignored  (Sets retvalbool, retvalint, retvalother.) 
  4571.  
  4572. Unused Declarations  (Section 10.4) 
  4573.  
  4574. These flags control when errors are reported for declarations that are never 
  4575. used.  The unused annotation can be used to prevent unused errors from being 
  4576. report for a particular declaration. 
  4577.  
  4578. m: ---+ 
  4579. topuse 
  4580.  
  4581. A external declaration is not used in any file. 
  4582.  
  4583. m: -+++ 
  4584. constuse 
  4585.  
  4586. Constant never used. 
  4587.  
  4588. m: -+++ 
  4589. enummemuse 
  4590.  
  4591. Member of enumerator never used. 
  4592.  
  4593. m: ++++ 
  4594. varuse 
  4595.  
  4596. Variable never used. 
  4597.  
  4598. m: -+++ 
  4599. paramuse 
  4600.  
  4601. Function parameter never used. 
  4602.  
  4603. m: ++++ 
  4604. fcnuse 
  4605.  
  4606. Function is never used. 
  4607.  
  4608. m: ++++ 
  4609. typeuse 
  4610.  
  4611. Defined type never used. 
  4612.  
  4613. m: -+++ 
  4614. fielduse 
  4615.  
  4616. Field of structure or union type is never used. 
  4617.  
  4618. m: ---+ 
  4619. unusedspecial 
  4620.  
  4621. Declaration in a special file ( corresponding to .l or .y file) is unused. 
  4622.  
  4623. Complete Programs  (Section 10.5) 
  4624.  
  4625. m: --++ 
  4626. declundef 
  4627.  
  4628. Function, variable, iterator or constant declared but never defined. 
  4629.  
  4630. shortcut 
  4631. partial 
  4632.  
  4633. Check as partial system (sets -declundef, -exportlocal and prevents checking of 
  4634. macros in headers without corresponding .c files.) 
  4635.  
  4636. Exports 
  4637.  
  4638. m: ---+ 
  4639. export-local 
  4640.  
  4641. A declaration is exported but not used outside this module.  (Declaration can 
  4642. use the static qualifier.) 
  4643.  
  4644. m: --++ 
  4645. export-header 
  4646.  
  4647. A declaration (other than a variable) is exported but does not appear in a 
  4648. header file. 
  4649.  
  4650. m: --++ 
  4651. export-header-var 
  4652.  
  4653. A variable declaration is exported but does not appear in a header file. 
  4654.  
  4655. Unrecognized Identifiers 
  4656.  
  4657. plain: + 
  4658. unrecog 
  4659.  
  4660. An unrecognized identifier is used. 
  4661.  
  4662. plain: + 
  4663. sys-unrecog 
  4664.  
  4665. Report unrecognized identifiers that start with the system prefix, __ (two 
  4666. underscores). 
  4667.  
  4668. plain: - 
  4669. repeat-unrecog 
  4670.  
  4671. Report multiple messages for unrecognized identifiers.  If repeatunrecog is not 
  4672. set, an error is reported only the first time a particular unrecognized 
  4673. identifier appears in the file. 
  4674.  
  4675. Multiple Definition and Declarations 
  4676.  
  4677. plain: + 
  4678. redef 
  4679.  
  4680. A function or variable is defined more than once. 
  4681.  
  4682. m: --++ 
  4683. redecl 
  4684.  
  4685. An identifier is declared more than once. 
  4686.  
  4687. m: -+++ 
  4688. nested-extern 
  4689.  
  4690. An extern declaration is used inside a function body. 
  4691.  
  4692.  ANSI C Conformance 
  4693.  
  4694.   m: --++ 
  4695. noparams 
  4696.  
  4697. A function is declared without a parameter list prototype. 
  4698.  
  4699. m: ---+ 
  4700. oldstyle 
  4701.  
  4702. Function definition is in old style syntax.  Standard prototype syntax is 
  4703. preferred. 
  4704.  
  4705. m: -+++ 
  4706. exitarg 
  4707.  
  4708. Argument to exit has implementation defined behavior.  The only valid arguments 
  4709. to exit are EXIT_SUCCESS, EXIT_FAILURE and 0.  An error is reported if LCLint 
  4710. can detect statically that the argument to exit is not one of these. 
  4711.  
  4712. Limits (Section 10.6) 
  4713.  
  4714. shortcut 
  4715. ansilimits 
  4716.  
  4717. Check for violations of standard limits (Sets controlnestdepth, 
  4718. stringliterallen, includenest, numstructfields, and numenummembers). 
  4719.  
  4720. m: ---+ 
  4721.  
  4722.  controlnestdepth <number> 
  4723.  
  4724. Set maximum nesting depth of compound statements, iteration control structures, 
  4725. and selection control structures (ANSI minimum is 15). 
  4726.  
  4727. m: ---+ 
  4728.  stringliterallen <number> 
  4729.  
  4730. Set maximum length of string literals (ANSI minimum is 509). 
  4731.  
  4732. m: ---+ 
  4733.  numstructfields <number> 
  4734.  
  4735. Set maximum number of fields in a struct or union (ANSI minimum is 127). 
  4736.  
  4737. m: ---+ 
  4738.  numenummembers <number> 
  4739.  
  4740. Set maximum number of members of an enum type (ANSI minimum is 127). 
  4741.  
  4742. m: --++ 
  4743.  includenest <number> 
  4744.  
  4745. Set maximum number of nested #include files (ANSI minimum is 8). 
  4746.  
  4747. Header Inclusion (Apppendix F) 
  4748.  
  4749.  plain: + 
  4750.  skip-ansi-headers 
  4751.  
  4752.  Prevent inclusion of header files in a system directory with names that match 
  4753. standard ANSI headers. The symbolic information in the standard library is used 
  4754. instead.  In effect only if a library that includes the ANSI library is used. 
  4755. The ANSI headers are: assert, ctype, errno, float, limits, locale, math, 
  4756. setjmp, signal, stdarg, stddef, stdio, stdlib, strings, string, time, and 
  4757. wchar. 
  4758.  
  4759.  plain: + 
  4760.  skip-posix-headers 
  4761.  
  4762.  Prevent inclusion of header files in a system directory with names that match 
  4763. standard POSIX headers. The symbolic information in the standard library is 
  4764. used instead.  In effect only if a library that includes the POSIX library is 
  4765. used.  The POSIX headers are: dirent, fcntl, grp, pwd, termios, sys/stat, 
  4766. sys/times, sys/types, sys/utsname, sys/wait, unistd, and utime. 
  4767.  
  4768. plain: + 
  4769.  warn-posix-headers 
  4770.  
  4771. Report use of a POSIX header when checking a program with a non-POSIX library. 
  4772.  
  4773. skipsysheaders 
  4774.  
  4775. Do not include header files in system directories (as set by -sysdirs) 
  4776.  
  4777. plain: + 
  4778.  sys-dir-expand-macros 
  4779.  
  4780. Expand macros in system directories regardless of other settings, except for 
  4781. macros corresponding to names defined in a load library. 
  4782.  
  4783. m: ---+ 
  4784. sys-dir-errors 
  4785.  
  4786. Report errors in files in system directories (set by -systemdirs). 
  4787.  
  4788.  single-include 
  4789.  
  4790. Optimize header inclusion to only include each header file once. 
  4791.  
  4792. never-include 
  4793.  
  4794. Use library information instead of including header files. 
  4795.  
  4796.  Comments 
  4797.  
  4798. These flags control how syntactic comments are interpreted (see Apppendix E). 
  4799.  
  4800.  commentchar <char> 
  4801.  
  4802. Set the marker character for syntactic comments.  Comments beginning with 
  4803. /*<char> are interpreted by LCLint.  Default: @ 
  4804.  
  4805. plain: - 
  4806. noaccess 
  4807.  
  4808. Ignore access comments. 
  4809.  
  4810. plain: - 
  4811. nocomments 
  4812.  
  4813. Ignore all stylized comments. 
  4814.  
  4815. plain: + 
  4816. supcounts 
  4817.  
  4818. Actual number of errors does not match number in /*@i<n>@*/ 
  4819.  
  4820. plain: + 
  4821. lintcomments 
  4822.  
  4823. Interpret traditional lint comments (/*FALLTHROUGH*/, /*NOTREACHED*/, 
  4824. /*PRINTLIKE*/). 
  4825.  
  4826. m: -+++ 
  4827. warnlintcomments 
  4828.  
  4829. Print a warning and suggest an alternative when a traditional lint comment is 
  4830. used. 
  4831.  
  4832. plain: + 
  4833.  unrecogcomments 
  4834.  
  4835. Stylized comment is unrecognized. 
  4836.  
  4837. Parsing 
  4838.  
  4839. plain: - 
  4840.  continue-comment 
  4841.  
  4842. A line continuation marker (\) appears inside a comment on the same line as the 
  4843. comment close. Preprocessors should handle this correctly, but it causes 
  4844. problems for some preprocessors.  plain: + 
  4845.  nest-comment 
  4846.  
  4847. A comment open sequence (/*) appears inside a comment.  This usually indicates 
  4848. that an earlier comment was not closed. 
  4849.  
  4850.  plain: + 
  4851.  duplicate-quals 
  4852.  
  4853.  Report duplicate type qualifiers (e.g., long long).  Duplicate type qualifiers 
  4854. not supported by ANSI, but some compilers (e.g., gcc) do support duplicate 
  4855. qualifiers. 
  4856.  
  4857. plain: - 
  4858.  gnu-extensions 
  4859.  
  4860. Support some GNU (gcc) language extensions. 
  4861.  
  4862.  Array Formal Parameters 
  4863.  
  4864.  These flags control reporting of common errors caused by confusion about the 
  4865. semantics of array formal parameters. 
  4866.  
  4867.  General Checks 
  4868.  
  4869.  plain: + 
  4870. sizeof-formal-array 
  4871.  
  4872. The sizeof operator is used on a parameter declared as an array.  (In many 
  4873. instances this has unexpected behavior, since the result is the size of a 
  4874. pointer to the element type, not the number of elements in the array.) 
  4875.  
  4876.  plain: + 
  4877. fixed-formal-array 
  4878.  
  4879.  An array formal parameter is declared with a fixed size (e.g., int x[20]). 
  4880. This is likely to be confusing, since the size is ignored. 
  4881.  
  4882.  plain: - 
  4883. formal-array 
  4884.  
  4885. A formal parameter is declared as an array.  This is probably not a problem, 
  4886. but can be confusing since it is treated as a pointer. 
  4887.  
  4888.  These flags should probably not be set globally since the turn off general 
  4889. checks that should always be done.  They may be used locally to suppress 
  4890. spurious errors. 
  4891.  
  4892. plain: + 
  4893. abstract 
  4894.  
  4895. A data abstraction barrier is violated. 
  4896.  
  4897. plain: + 
  4898. control 
  4899.  
  4900. A control flow error is detected. 
  4901.  
  4902. plain: + 
  4903. syntax 
  4904.  
  4905. Parse error. 
  4906.  
  4907. plain: - 
  4908. trytorecover 
  4909.  
  4910. Try to recover from a parse error.  If trytorecover is not set, LCLint will 
  4911. abort checking after a parse error is detected.  If it is set, LCLint will 
  4912. attempt to recover, but LCLint does performs only minimal error recovery. 
  4913.  
  4914. plain: + 
  4915. type 
  4916.  
  4917. Type mismatch. 
  4918.  
  4919. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  4920.  
  4921.  David Evans 
  4922. Systematic Program Development 
  4923. evs@larch.lcs.mit.edu 
  4924.  
  4925.  
  4926. ΓòÉΓòÉΓòÉ 1.13.5. Flag Name Abbreviations ΓòÉΓòÉΓòÉ
  4927.  
  4928. Flag Name Abbreviations 
  4929.  
  4930. Within a flag name, abbreviations may be used. Table 2 shows the flag name 
  4931. abbreviations.  The expanded and short forms are interchangeable in flag names. 
  4932.  
  4933. For example, globsimpmodsnothing and globalsimpliesmodifiesnothing denote the 
  4934. same flag.  Abbreviations in flag names allow pronounceable, descriptive names 
  4935. to be used without making flag names excessively long (although one must admit 
  4936. even globsimpmodsnothing is a bit of a mouthful.) 
  4937.  
  4938. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  4939. ΓöéExpanded Form                         ΓöéShort Form                            Γöé
  4940. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4941. Γöéconstant                              Γöé                       const          Γöé
  4942. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4943. Γöédeclaration                           Γöé                   decl               Γöé
  4944. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4945. Γöéfunction                              Γöé     fcn                              Γöé
  4946. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4947. Γöéglobal                                Γöé                              glob    Γöé
  4948. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4949. Γöéimplicit, implied                     Γöé        imp                           Γöé
  4950. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4951. Γöéiterator                              Γöé       iter                           Γöé
  4952. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4953. Γöélength                                Γöé   len                                Γöé
  4954. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4955. Γöémodifies                              Γöé        mods                          Γöé
  4956. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4957. Γöémodify                                Γöé      mod                             Γöé
  4958. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4959. Γöémemory                                Γöé   mem                                Γöé
  4960. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4961. Γöéparameter                             Γöé    param                             Γöé
  4962. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4963. Γöépointer                               Γöé    ptr                               Γöé
  4964. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4965. Γöéreturn                                Γöé    ret                               Γöé
  4966. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4967. Γöévariable                              Γöé   var                                Γöé
  4968. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4969. Γöéunconstrained, unconst                Γöé    uncon                             Γöé
  4970. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  4971.   Table 2.  Flag name abbreviations. 
  4972.  
  4973. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  4974.  
  4975.  David Evans 
  4976. Systematic Program Development 
  4977. evs@larch.lcs.mit.edu 
  4978.  
  4979.  
  4980. ΓòÉΓòÉΓòÉ 1.14. LCLint User's Guide - Appendix D  Annotations ΓòÉΓòÉΓòÉ
  4981.  
  4982.  
  4983.  
  4984. Appendix D  Annotations 
  4985.  
  4986. The grammar below is the C syntax from [K&R,A13] modified to show the syntax of 
  4987. syntactic comments.  Only productions effected by LCLint annotations are shown. 
  4988. In the annotations, the @ represents the comment marker char, set by 
  4989. -commentchar (default is @). 
  4990.  
  4991. Functions 
  4992.  
  4993. direct-declarator: 
  4994.  
  4995.           direct-declarator (parameter-type-list_opt) globals_opt modifies_opt
  4996.         | direct-declarator (identifier-list_opt) globals_opt modifies_opt
  4997.  
  4998. globals: (Section 4.2) 
  4999.  
  5000.           /*@globals globitem,+ ;_opt @*/
  5001.         | /*@globals declaration-list_opt ;_opt @*/
  5002. globitem: 
  5003.  
  5004.            globannot* identifier
  5005.         |  internalState
  5006.         |  systemState
  5007.  
  5008. globannot: undef | killed 
  5009.  
  5010. modifies: (Section 4.1) 
  5011.  
  5012.            /*@modifies moditem,+;_opt @*/
  5013.          | /*@modifies nothing ;_opt @*/
  5014.          | /*@*/  (Abbreviation for no globals and modifies nothing.)
  5015.  
  5016. moditem: 
  5017.  
  5018.            expression
  5019.          | internalState
  5020.          | systemState
  5021.  
  5022. Iterators (Section 8.4) 
  5023.  
  5024. The globals and modifies clauses for an iterator are the same as those for a 
  5025. function, except they are not enclosed by a comment, since the iterator is 
  5026. already a comment. 
  5027.  
  5028. direct-declarator: 
  5029.  
  5030.        /*@iter identifier (parameter-type-list_opt) globals_opt
  5031. modifies_opt @*/
  5032.  
  5033. Constants (Section 8.1) 
  5034.  
  5035. external-declaration: 
  5036.  
  5037.        /*@constant declaration ;_opt @*/
  5038.  
  5039. Alternate Types (Section 8.2.2) 
  5040.  
  5041. Alternate types may be used in the type specification of parameters and return 
  5042. values. 
  5043.  
  5044. extended-type: 
  5045.  
  5046.         type-specifier alt-type_opt
  5047.  
  5048. alt-type: 
  5049.  
  5050.         /*@alt basic-type,+ @*/
  5051.  
  5052. Declarator Annotations 
  5053.  
  5054. General annotations appear after storage-class-specifiers and before 
  5055. type-specifiers.  Multiple annotations may be used in any order.  Here, 
  5056. annotations are without the surrounding comment.  In a declaration, the 
  5057. annotation would be surrounded by /*@ and @*/.  In a globals or modifies clause 
  5058. or iterator or constant declaration, no surrounding comment would be used since 
  5059. they are within a comment. 
  5060.  
  5061. Type Definitions  (Section 3) 
  5062.  
  5063. A type definition may use any either abstract or concrete, either mutable or 
  5064. immutable, and refcounted.  Only a pointer to a struct may be declared with 
  5065. refcounted.  Mutability annotations may not be used with concrete types since 
  5066. concrete types inherit their mutability from the actual type. 
  5067.  
  5068. abstract 
  5069.  
  5070. Type is abstract (representation is hidden from clients). 
  5071.  
  5072. concrete 
  5073.  
  5074. Type is concrete (representation is visible to clients). 
  5075.  
  5076. immutable 
  5077.  
  5078. Instances of the type cannot change value.  (Section 3.2) 
  5079.  
  5080. mutable 
  5081.  
  5082. Instances of the type can change value.  (Section 3.2) 
  5083.  
  5084. refcounted 
  5085.  
  5086. Reference counted type.  (Section 5.4) 
  5087.  
  5088. Global Variables  (Section 4.2.1) 
  5089.  
  5090. One check annotation may be used on a global or file-static variable 
  5091. declaration. 
  5092.  
  5093. unchecked 
  5094.  
  5095. Weakest checking for global use. 
  5096.  
  5097. checkmod 
  5098.  
  5099. Check modification by not use of global. 
  5100.  
  5101. checked 
  5102.  
  5103. Check use and modification of global. 
  5104.  
  5105. checkedstrict 
  5106.  
  5107. Check use of global, even in functions with no global list. 
  5108.  
  5109. Memory Management  (Section 5) 
  5110.  
  5111. dependent 
  5112.  
  5113. A reference to externally-owned storage.  (Section 5.2.2) 
  5114.  
  5115. keep 
  5116.  
  5117. A parameter that is kept by the called function.  The caller may use the 
  5118. storage after the call, but the called function is responsible for making sure 
  5119. it is deallocated.  (Section 5.2.4) 
  5120.  
  5121. killref 
  5122.  
  5123. A refcounted parameter.  This reference is killed by the call. (Section 5.4) 
  5124.  
  5125. only 
  5126.  
  5127. A unshared reference.  Associated memory must be released before reference is 
  5128. lost.  (Section 5.2) 
  5129.  
  5130. owned 
  5131.  
  5132. Storage may be shared by dependent references, but associated memory must be 
  5133. released before this reference is lost.  (Section 5.2.2) 
  5134.  
  5135. shared 
  5136.  
  5137. Shared reference that is never deallocated.  (Section 5.2.5) 
  5138.  
  5139. temp 
  5140.  
  5141. A temporary parameter.  May not be released, and new aliases to it may not be 
  5142. created.  (Section 5.2.2) 
  5143.  
  5144. Aliasing  (Section 6) 
  5145.  
  5146. Both alias annotations may be used on a parameter declaration. 
  5147.  
  5148. unique 
  5149.  
  5150. Parameter that may not be aliased by any other reference visible to the 
  5151. function. (Section 6.1.1) 
  5152.  
  5153. returned 
  5154.  
  5155. Parameter that may be aliased by the return value.  (Section 6.1.2) 
  5156.  
  5157. Exposure  (Section 6.2) 
  5158.  
  5159. observer 
  5160.  
  5161. Reference that cannot be modified.  (Section 6.2.1) 
  5162.  
  5163. exposed 
  5164.  
  5165. Exposed reference to storage in another object. (Section 6.2.1) 
  5166.  
  5167. Definition State  (Section 7.1) 
  5168.  
  5169. out 
  5170.  
  5171. Storage reachable from reference need not be defined. 
  5172.  
  5173. in 
  5174.  
  5175. All storage reachable from reference must be defined. 
  5176.  
  5177. partial 
  5178.  
  5179. Partially defined.  A structure may have undefined fields.  No errors reported 
  5180. when fields are used. 
  5181.  
  5182. reldef 
  5183.  
  5184. Relax definition checking.  No errors when reference is not defined, or when it 
  5185. is used. 
  5186.  
  5187. Global State  (Section 7.1.4) 
  5188.  
  5189. These annotations may only be used in globals lists.  Both annotations may be 
  5190. used for the same variable, to mean the variable is undefined before and after 
  5191. the call. 
  5192.  
  5193. undef 
  5194.  
  5195. Variable is undefined before the call. 
  5196.  
  5197. killed 
  5198.  
  5199. Variable is undefined after the call. 
  5200.  
  5201. Null State  (Section 7.2) 
  5202.  
  5203. null 
  5204.  
  5205. Possibly null pointer. 
  5206.  
  5207. notnull 
  5208.  
  5209. Non-null pointer. 
  5210.  
  5211. relnull 
  5212.  
  5213. Relax null checking.  No errors when NULL is assigned to it, or when it is used 
  5214. as a non-null pointer. 
  5215.  
  5216. Null Predicates  (Section 7.2.1) 
  5217.  
  5218. A null predicate annotation may be used of the return value of a function 
  5219. returning a boolean type, taking a possibly-null pointer for its first 
  5220. argument. 
  5221.  
  5222. truenull 
  5223.  
  5224. If result is TRUE, first parameter is NULL. 
  5225.  
  5226. falsenull 
  5227.  
  5228. If result is TRUE, first parameter is not NULL. 
  5229.  
  5230. Execution  (Section 7.3) 
  5231.  
  5232. The exits, mayexit and neverexits annotations may be used on any function.  The 
  5233. trueexit and falseexit annotations may only be used on functions whose first 
  5234. argument is a boolean. 
  5235.  
  5236. exits 
  5237.  
  5238. Function never returns. 
  5239.  
  5240. mayexit 
  5241.  
  5242. Function may or may not return. 
  5243.  
  5244. trueexit 
  5245.  
  5246. Function does not return if first parameter is TRUE. 
  5247.  
  5248. falseexit 
  5249.  
  5250. Function does not return if first parameter if FALSE. 
  5251.  
  5252. neverexit 
  5253.  
  5254. Function always returns. 
  5255.  
  5256. Side-Effects  (Section 8.2.1) 
  5257.  
  5258. sef 
  5259.  
  5260. Corresponding actual parameter has no side effects. 
  5261.  
  5262. Declaration 
  5263.  
  5264. These annotations can be used on a declaration to control unused or undefined 
  5265. error reporting. 
  5266.  
  5267. unused 
  5268.  
  5269. Identifier need not be used (no unused errors reported.)  (Section 10.4) 
  5270.  
  5271. external 
  5272.  
  5273. Identifier is defined externally (no undefined error reported.) (Section 10.5) 
  5274.  
  5275. Case 
  5276.  
  5277. fallthrough 
  5278.  
  5279. Fall-through case.  No message is reported if the previous case may 
  5280. fall-through into the one immediately after the fallthrough. 
  5281.  
  5282. Break  (Section 10.2.3) 
  5283.  
  5284. These annotations are used before a break or continue statement. 
  5285.  
  5286. innerbreak 
  5287.  
  5288. Break is breaking an inner loop or switch. 
  5289.  
  5290. loopbreak 
  5291.  
  5292. Break is breaking a loop. 
  5293.  
  5294. switchbreak 
  5295.  
  5296. Break is breaking a switch. 
  5297.  
  5298. innercontinue 
  5299.  
  5300. Continue is continuing an inner loop. 
  5301.  
  5302. Unreachable Code 
  5303.  
  5304. This annotation is used before a statement to prevent unreachable code errors. 
  5305.  
  5306. notreached 
  5307.  
  5308. Statement may be unreachable. 
  5309.  
  5310. Special Functions (Apppendix E) 
  5311.  
  5312. These annotations are used immediately before a function declaration. 
  5313.  
  5314. printflike 
  5315.  
  5316. Check variable arguments like printf library function. 
  5317.  
  5318. scanflike 
  5319.  
  5320. Check variable arguments like scanf library function. 
  5321.  
  5322. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  5323.  
  5324.  David Evans 
  5325. Systematic Program Development 
  5326. evs@larch.lcs.mit.edu 
  5327.  
  5328.  
  5329. ΓòÉΓòÉΓòÉ 1.15. LCLint User's Guide - Appendix E  Control Comments ΓòÉΓòÉΓòÉ
  5330.  
  5331.  
  5332.  
  5333. Appendix E  Control Comments 
  5334.  
  5335. Error Suppression 
  5336.  
  5337. Several comments are provided for suppressing messages.  In general, it is 
  5338. usually better to use specific flags to suppress a particular error 
  5339. permanently, but the general error suppression flags may be more convenient for 
  5340. quickly suppressing messages for code that will be corrected or documented 
  5341. later. 
  5342.  
  5343. ignore 
  5344. end 
  5345.  
  5346. No errors will be reported in code regions between /*@ignore@*/ and /*@end@*/. 
  5347. These comments can be used to easily suppress an unlimited number of messages, 
  5348. but are dangerous since if real errors are introduced in the ignore ... end 
  5349. region they will not be reported. The ignore and end comments must be matched - 
  5350. a warning is printed if the file ends in an ignore region or if ignore is used 
  5351. inside ignore region.  i 
  5352.  
  5353. No errors will be reported from an /*@i@*/ comment to the end of the line. 
  5354.  
  5355.  i<n> 
  5356.  
  5357.  No errors will be reported from an /*@i<n>@*/ (e.g., /*@i3@*/) comment to the 
  5358. end of the line. If there are not exactly n errors suppressed from the comment 
  5359. point to the end of the line, LCLint will report an error.  This is more robust 
  5360. than i or ignore since a message is generated if the expected number errors is 
  5361. not present.  Since errors are not necessarily detected until after this file 
  5362. is processed (for example, and unused variable error), suppress count errors 
  5363. are reported after all files have been processed. The -supcounts flag may be 
  5364. used to suppress these errors.  This is useful when a system if being rechecked 
  5365. with different flag settings.  t 
  5366. t<n> 
  5367.  
  5368. Like i and i<n>, except controlled by +tmpcomments flag.  These can be used to 
  5369. temporarily suppress certain errors.  Then, -tmpcomments can be set to find 
  5370. them again. 
  5371.  
  5372. Type Access 
  5373.  
  5374. Control comments may also be used to override type access settings. The syntax 
  5375. /*@access <type>,+@*/ allows the following code to access the representation of 
  5376. <type>.  Similarly, /*@noaccess <type>,+@*/ restricts access to the 
  5377. representation of <type>.  The type in a noaccess comment must have been 
  5378. declared as an abstract type.  Type access applies from the point of the 
  5379. comment to the end of the file or the next access control comment for this 
  5380. type. 
  5381.  
  5382. Macro Expansion 
  5383.  
  5384. The /*@notfunction@*/indicates that the next macro definition is not intended 
  5385. to be a function, and should be expanded in line instead of checked as a macro 
  5386. function definition. 
  5387.  
  5388. Traditional Lint Comments 
  5389.  
  5390. Some of the control comments supported by most standard UNIX lints are 
  5391. supported by LCLint so legacy systems can be checked more easily. These 
  5392. comments are not lexically consistent with LCLint comments, and their meanings 
  5393. are less precise (and may vary between different lint programs), so we 
  5394. recommend that LCLint comments are used instead except for checking legacy 
  5395. systems already containing standard lint comments. 
  5396.  
  5397. These standard lint comments supported by LCLint: 
  5398.  
  5399. /*FALLTHROUGH*/ (alternate misspelling, /*FALLTHRU*/) 
  5400.  
  5401. Prevents errors for fall-through cases.  Same meaning as /*@fallthrough@*/. 
  5402. /*NOTREACHED*/ 
  5403.  
  5404. Prevents errors about unreachable code (until the end of the function).  Same 
  5405. meaning as /*@notreached@*/.  /*PRINTFLIKE*/ 
  5406.  
  5407. Arguments similar to the printf library function (there didn't seem to be much 
  5408. of a consensus among standard lints as to exactly what this means).  LCLint 
  5409. supports: 
  5410.  
  5411. /*@printflike@*/ 
  5412.  
  5413. Function takes zero or more arguments of any type, an unmodified char * format 
  5414. string argument and zero of more arguments of type and number dictated by the 
  5415. format string.  Format codes are interpreted identically to the printf standard 
  5416. library function.  May return a result of any type.  (LCLint interprets 
  5417. /*PRINTFLIKE*/ as /*@printflike@*/.) 
  5418.  
  5419.  /*@scanflike@*/ 
  5420.  
  5421. Like printflike, except format codes are interpreted as in the scanf library 
  5422. function.  /*ARGSUSED*/ 
  5423.  
  5424. Turns off unused parameter messages for this function.  The control comment, 
  5425. /*@-paramuse@*/ can be used to the same effect, or /*@unused@*/ can be used in 
  5426. individual parameter declarations. 
  5427.  
  5428. LCLint will ignore standard lint comments if -lintcomments is used. If 
  5429. +warnlintcomments is used, LCLint generates a message for standard lint 
  5430. comments and suggest replacements, 
  5431.  
  5432. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  5433.  
  5434.  David Evans 
  5435. Systematic Program Development 
  5436. evs@larch.lcs.mit.edu 
  5437.  
  5438.  
  5439. ΓòÉΓòÉΓòÉ 1.16. LCLint User's Guide - Appendix F  Libraries ΓòÉΓòÉΓòÉ
  5440.  
  5441.  
  5442.  
  5443. Appendix F  Libraries 
  5444.  
  5445. Libraries can be used to record interface information.  A library containing 
  5446. information about the  Standard C Library is used to enable checking of library 
  5447. calls.  Program libraries can be created to enable fast checking of single 
  5448. modules in a large program. 
  5449.  
  5450. Standard Libraries 
  5451.  
  5452. In order to check calls to library functions, LCLint uses an annotated standard 
  5453. library.  This contains more information about function interfaces then is 
  5454. available in the system header files since it uses annotations.  Further, it 
  5455. contains only those functions documented in the ANSI Standard.  Many systems 
  5456. include extra functions in their system libraries; programs that use these 
  5457. functions cannot be compiled on other systems that do not provide them. 
  5458. Certain types defined by the library are treated as abstract types (e.g., a 
  5459. program should not rely on how the FILE type is implemented). When checking 
  5460. source code, LCLint does include system headers according to include directive 
  5461. in the source code, but instead uses the library description of the standard 
  5462. library. 
  5463.  
  5464.  The LCLint distribution includes several different standard libraries: the 
  5465. ANSI standard library, the POSIX standard library , and an ad hoc UNIX library. 
  5466. Each library comes in two versions: the standard version and the strict 
  5467. version. 
  5468.  
  5469. ANSI Library 
  5470.  
  5471.  The default behavior of LCLint is to use the ANSI standard library (loaded 
  5472. from ansi.lcd).  This library is based on the standard library described in the 
  5473. ANSI C Standard.  It includes functions and types added by Amendment 1 to the 
  5474. ANSI C Standard. 
  5475.  
  5476.  POSIX Library 
  5477.  
  5478.  The POSIX library is selected by the +posixlib flag.  The POSIX library is 
  5479. based on the IEEE Std 1003.1-1990. 
  5480.  
  5481.  UNIX Library 
  5482.  
  5483.  The UNIX library is selected by the +unixlib flag.  This library is an ad hoc 
  5484. attempt to capture additional functionality provided by many UNIX platforms. 
  5485. Unfortunately, UNIX systems vary widely and very few are consistent with the 
  5486. ANSI Standard. 
  5487.  
  5488. The differences between the UNIX library and the POSIX library are: 
  5489.  
  5490.      In the UNIX library, free is declared with a non-null parameter.  ANSI C 
  5491.       specifies that free should handle the argument NULL, but several UNIX 
  5492.       platforms crash if NULL is passed to free. 
  5493.      Extra variables, constants and functions are included in the UNIX 
  5494.       library.  Some declarations are not  part of the POSIX library, but are 
  5495.       believed to be available on many UNIX systems.  See lib/unix.h for a list 
  5496.       of the UNIX-only declarations. 
  5497.  
  5498.  Code checked using the UNIX library can probably be ported to some UNIX 
  5499.  systems without difficulty.  To enhance the likelihood that a program is 
  5500.  portable, the POSIX library should be used instead. 
  5501.  
  5502.  Strict Libraries 
  5503.  
  5504.  Stricter versions of the libraries are used if the -ansi-strict, 
  5505.  posix-strict-lib or unix-strct-lib flag is used. These libraries use a 
  5506.  stricter interpretation of the library.  They will detect more errors in some 
  5507.  programs, but may to produce many spurious errors for typical code. 
  5508.  
  5509.  The differences between the standard libraries and the strict libraries are: 
  5510.  
  5511.      The standard libraries declare the printing functions (fprintf, printf, 
  5512.       and sprintf) that may return error codes to return int or void.  This 
  5513.       prevents typical programs from leading to deluge of ignored return value 
  5514.       errors, but may mean some relevant errors are not detected.  In the 
  5515.       strict libraries, they are declared to return int, so ignored return 
  5516.       value errors will be reported (depending on other flag settings). 
  5517.       Programs should check that this return value is non-negative. 
  5518.      The standard libraries declare some parameters and return values to be 
  5519.       alternate types (int or bool, or int or char).  The ANSI standard 
  5520.       specifies these types as int to be compatible with older versions of the 
  5521.       library, but logically they make more sense as bool or char.  In the 
  5522.       strict libraries, the stronger type is used.  The parameter to assert is 
  5523.       int or bool in the standard library, and bool in the strict library.  The 
  5524.       parameter to the character functions isalnum, isalpha, iscntrl, isdigit, 
  5525.       isgraph, islower, isprint, ispunct, isspace, isupper, isxdigit, tolower 
  5526.       and toupper is char or int in the standard library and char in the strict 
  5527.       library.  The type of the return value of the character classification 
  5528.       functions (all of the previous character functions except tolower and 
  5529.       toupper) is bool or int in the standard library and bool in the strict 
  5530.       library.  The type of the first parameter to ungetc is char or int in the 
  5531.       standard library and char in the strict library (EOF should not be passed 
  5532.       to ungetc).  The second parameter to strchr and strrchr is char or int in 
  5533.       the standard library and char in the strict library. 
  5534.      The global variables stdin, stdout and stderr are declared as unchecked 
  5535.       variables (see Section 4.2.1) in the standard libraries.  In the strict 
  5536.       libraries, they are checked.  The global variable errno is declared 
  5537.       unchecked in the standard libraries, but declared checkedstrict in the 
  5538.       strict libraries. 
  5539.  
  5540.   Generating the Standard Libraries 
  5541.  
  5542.   The standard libraries are generated from header files included in the LCLint 
  5543.  distribution.  Some libraries are generated from more than one header file. 
  5544.  Since the POSIX library includes the ANSI library, the headers for the ANSI 
  5545.  and POSIX libraries are combined to produce the POSIX library.  Similarly, the 
  5546.  UNIX library is composed of the ANSI, POSIX and UNIX headers.  The header 
  5547.  files include some sections that are conditionally selected by defining 
  5548.  STRICT. 
  5549.  
  5550.  The commands to generate the standard libraries are: 
  5551.  
  5552.   lclint -nolib ansi.h -dump ansi
  5553.   lclint -nolib -DSTRICT ansi.h -dump ansistrict
  5554.   lclint -nolib ansi.h posix.h -dump posix
  5555.   lclint -nolib -DSTRICT ansi.h posix.h -dump posixstrict
  5556.   lclint -nolib ansi.h posix.h unix.h -dump unix
  5557.   lclint -nolib -DSTRICT ansi.h posix.h unix.h -dump unixstrict
  5558.  
  5559.  User Libraries 
  5560.  
  5561.  To enable running LCLint on large systems, mechanisms are provided for 
  5562.  creating libraries containing necessary information.  This means source files 
  5563.  can be checked independently, after a library has been created. The command 
  5564.  line option -dump library stores information in the file library (the default 
  5565.  extension, .lcd[27], is added). Then, -load library loads the library.  The 
  5566.  library contains interface information from the files checked when the library 
  5567.  was created. 
  5568.  
  5569.   Header File Inclusion 
  5570.  
  5571.  The standard behavior of LCLint on encountering 
  5572.  
  5573.      #include <X.h>
  5574.   is to search for a file named X.h on the include search path (set using -I) 
  5575.  and then the system base include path (usually /usr/include, default is set 
  5576.  when LCLint is compiled).  If X.h is the name of a header file in a loaded 
  5577.  standard library (either ANSI or POSIX) and X.h is found in a directory that 
  5578.  is a system directory (as set by the -sysdirs flag; the default is 
  5579.  /usr/include), X.h will not be included if skip-ansi-headers or 
  5580.  skip-posix-headers (depending on whether X.h is an ANSI or POSIX header file) 
  5581.  is on (both are on by default).  To force all headers to be included normally, 
  5582.  use -skip-ansi-headers and -skip-posix-headers. 
  5583.  
  5584.   Sometimes headers in system directories contain non-standard syntax which 
  5585.  LCLint is unable to parse.  The +skip-sys-headers flag may be used to prevent 
  5586.  any include file in a system directory from being included. 
  5587.  
  5588.  LCLint is fast enough that it can be run on medium-size (10,000 line) programs 
  5589.  without performance concerns.  It takes about one second to process a thousand 
  5590.  source lines on a DEC Alpha.  Libraries can be used to enable efficient 
  5591.  checking of small modules in large programs.  To further improve performance, 
  5592.  header file inclusion can be optimized. 
  5593.  
  5594.  When processing a complete system in which many files include the same 
  5595.  headers, a large fraction of processing time is wasted re-reading header files 
  5596.  unnecessarily.  If you are checking a 100-file program, and every file 
  5597.  includes utils.h, LCLint will have to process utils.h 100 times (as would most 
  5598.  C compilers).  If the +singleinclude flag is used, each header file is 
  5599.  processed only once.  Single header file processing produces a significant 
  5600.  efficiency improvement when checking large programs split into many files, but 
  5601.  is only safe if the same header file included in different contexts always has 
  5602.  the same meaning (i.e., it does not depend on preprocessor variable defined 
  5603.  differently at different inclusion sites). 
  5604.  
  5605.  When processing a single file in a large system, a large fraction of the time 
  5606.  is spent processing included header files.  This can be avoided if the 
  5607.  information in the header files is stored in a library instead.  If 
  5608.  +neverinclude is set, inclusion of files ending in .h is prevented.  Files 
  5609.  with different suffixes are included normally.  To do this the header files 
  5610.  must not include any expanded macros. That is, the header file must be 
  5611.  processed with +allmacros, and there must be no /*@notfunction@*/ control 
  5612.  comments in the header.  Then, the +neverinclude flag may be used to prevent 
  5613.  inclusion of header files.  Alternately, non-function macros can be moved to a 
  5614.  different file with a name that does not end in .h.  Remember, that this file 
  5615.  must be included directly from the .c file, since if it is included from a .h 
  5616.  file indirectly, that .h file is ignored so the other file is never included. 
  5617.  
  5618.  These options can be used for significant performance improvements on large 
  5619.  systems.  The performance depends on how the code is structured, but checking 
  5620.  a single module in a large program is several times faster if libraries and 
  5621.  +neverinclude are used. 
  5622.  
  5623.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  5624.  
  5625.   David Evans 
  5626.  Systematic Program Development 
  5627.  evs@larch.lcs.mit.edu 
  5628.  
  5629.  
  5630. ΓòÉΓòÉΓòÉ 1.17. LCLint User's Guide - Appendix G  Specifications ΓòÉΓòÉΓòÉ
  5631.  
  5632.  
  5633.  
  5634. Appendix G  Specifications 
  5635.  
  5636. Another way of providing more information about programs is to use formal 
  5637. specifications.  Although this document has largely ignored specifications, 
  5638. LCLint was originally designed to use the information in LCL specifications 
  5639. instead of source-code annotations.  This document focuses on annotations since 
  5640. it takes less effort to add annotations to source code than to maintain an 
  5641. additional specification file.  Annotations can express everything that can be 
  5642. expressed in LCL specifications that is relevant to LCLint checking.  However, 
  5643. LCL specifications can provide more precise documentation on program interfaces 
  5644. than is possible with LCLint annotations. This appendix (extracted from 
  5645. [Evans94]) is a very brief introduction to LCL Specifications. For more 
  5646. information, consult [GH93]. 
  5647.  
  5648. The Larch family of languages is a two-tiered approach to formal specification. 
  5649. A specification is built using two languages -- the Larch Shared Language 
  5650. (LSL), which is independent of the implementation language, and a Larch 
  5651. Interface Language designed for the specific implementation language.  An LSL 
  5652. specification defines sorts, analogous to abstract types in a programming 
  5653. language, and operators, analogous to procedures. It expresses the underlying 
  5654. semantics of an abstraction. 
  5655.  
  5656. The interface language specifies an interface to an abstraction in a particular 
  5657. programming language.  It captures the details of the interface needed by a 
  5658. client using the abstraction and places constraints on both correct 
  5659. implementations and uses of the module.  The semantics of the interface are 
  5660. described using primitives and sorts and operators defined in LSL 
  5661. specifications.  Interface languages have been designed for several programming 
  5662. languages. 
  5663.  
  5664. LCL [GH93, Tan94] is a Larch interface language for Standard C.  LCL uses a 
  5665. C-like syntax.  Traditionally, a C module M consists of a source file, M.c, and 
  5666. a header file, M.h.  The header file contains prototype declarations for 
  5667. functions, variables and constants exported by M, as well as those macro 
  5668. definitions that implement exported functions or constants, and definitions of 
  5669. exported types. When using LCL, a module includes two additional files - M.lcl, 
  5670. a formal specification of M, and  M.lh, which is derived by LCLint (if the lh 
  5671. flag is on) from M.lcl.  Clients use M.lcl for documentation, and should not 
  5672. need to look at any implementation file.  The derived file, M.lh, contains 
  5673. include directives (if M depends on other specified modules), prototypes of 
  5674. functions and declarations of variables as specified in M.lcl.  The file M.h 
  5675. should include M.lh and retain the implementation aspects of the old M.h, but 
  5676. is no longer used for client documentation. 
  5677.  
  5678. The LCLint release package includes a grammar for LCL and examples of LCL 
  5679. specifications. 
  5680.  
  5681. Specification Flags 
  5682.  
  5683. These flags are relevant only when LCLint is used with LCL specifications. 
  5684.  
  5685. Global Flags 
  5686.  
  5687. lcs 
  5688.  
  5689. Generate .lcs files containing symbolic state of .lcl files (used for imports). 
  5690. By default .lcs files are generated for each .lcl file processed.  Use -lcs to 
  5691. prevent generation of .lcs files. 
  5692.  
  5693. lh 
  5694.  
  5695. Generate .lh files.  By default, -lh is set and no .lh files are generated. Use 
  5696. +lh to enable .lh file generation. 
  5697.  
  5698.  i <file> 
  5699.  
  5700. Set LCL initialization file to <file>.  The LCL initialization file is read if 
  5701. any .lcl files are listed on the command line.  The default file is 
  5702. lclinit.lci, found on the LARCH_PATH. 
  5703.  
  5704.  lclexpect <number> 
  5705.  
  5706. Exactly <number> specification errors are expected.  Specification errors are 
  5707. errors detected when checking the specifications.  They do not depend on the 
  5708. source code. 
  5709.  
  5710. Implicit Globals Checking Qualifiers 
  5711.  
  5712.  m: -+++ 
  5713. impcheckedspecglobs 
  5714. Implicit checked qualifier on global variables specified in an LCL file with no 
  5715. checking annotation. 
  5716.  
  5717. m: ---- 
  5718. impcheckmodspecglobs 
  5719. Implicit checkmod qualifier on global variables specified in an LCL file with 
  5720. no checking annotation. 
  5721.  
  5722. m: ---+ 
  5723. impcheckedstrictspecglobs 
  5724.  
  5725. Implicit checked qualifier on global variables specified in an LCL file with no 
  5726. checking annotation. 
  5727.  
  5728. Implicit Annotations 
  5729.  
  5730.  plain: - 
  5731. specglobimponly 
  5732.  
  5733. Implicit only annotation on global variable declaration in an LCL file with no 
  5734. allocation annotation. 
  5735.  
  5736.  plain: - 
  5737. specretimponly 
  5738.  
  5739. Implicit only annotation on return value declaration in an LCL file with no 
  5740. allocation annotation. 
  5741.  
  5742. plain: - 
  5743. specstructimponly 
  5744.  
  5745. Implicit only annotation on structure field declarations in an LCL file with no 
  5746. allocation annotation. 
  5747.  
  5748. shortcut 
  5749. specimponly 
  5750.  
  5751. Sets specglobimponly, specretimponly and specstructimponly. 
  5752.  
  5753. Macro Expansion 
  5754.  
  5755. plain: + 
  5756.  specmacros 
  5757.  
  5758. Macros defining specified identifiers are not expanded and are checked 
  5759. according to the specification. 
  5760.  
  5761. Complete Programs and Specifications 
  5762.  
  5763. m: -+++ 
  5764. specundef 
  5765.  
  5766. Function, variable, iterator or constant specified but never defined. 
  5767.  
  5768. plain: - 
  5769.  specundecl 
  5770.  
  5771. Function, variable, iterator or constant specified but never declared. 
  5772.  
  5773. plain: - 
  5774. needspec 
  5775.  
  5776. There is information in the specification that is not duplicated in syntactic 
  5777. comments.  Normally, this is not an error, but it may be useful to detect it to 
  5778. make sure checking incomplete systems without the specifications will still use 
  5779. this information. 
  5780.  
  5781. shortcut 
  5782.  exportany 
  5783.  
  5784. An error is reported for any identifier that is exported but not specified. 
  5785. (Sets all export flags below.) 
  5786.  
  5787. m: ---+ 
  5788. exportconst 
  5789.  
  5790. Constant exported but not specified. 
  5791.  
  5792. m: ---+ 
  5793. exportvar 
  5794.  
  5795. Variable exported but not specified. 
  5796.  
  5797. m: ---+ 
  5798. exportfcn 
  5799.  
  5800. Function exported but not specified. 
  5801.  
  5802. m: ---+ 
  5803. exportiter 
  5804.  
  5805. Iterator exported but not specified. 
  5806.  
  5807. m: ---+ 
  5808.  exportmacro 
  5809.  
  5810. An expanded macro exported but not specified 
  5811.  
  5812. m: ---+ 
  5813. exporttype 
  5814.  
  5815. Type definition exported but not specified 
  5816.  
  5817. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  5818.  
  5819.  David Evans 
  5820. Systematic Program Development 
  5821. evs@larch.lcs.mit.edu 
  5822.  
  5823.  
  5824. ΓòÉΓòÉΓòÉ 1.18. LCLint User's Guide - Appendix H  Emacs ΓòÉΓòÉΓòÉ
  5825.  
  5826.  
  5827.  
  5828. Appendix H  Emacs 
  5829.  
  5830. LCLint can be used most productively with the emacs text editor.  The release 
  5831. package includes emacs files for running LCLint and editing code with 
  5832. annotations. 
  5833.  
  5834. Running LCLint 
  5835.  
  5836. LCLint release includes emacs/lclint.elc that defines an emacs command, M-x 
  5837. lclint, for running LCLint.  To load this file, add this line to your .emacs 
  5838. file: 
  5839.  
  5840. (load-file "<directory>/lclint.elc") 
  5841.  
  5842. The M-x lclint command is similar to M-x compile, except it jumps to the exact 
  5843. column location of the error message, instead of the beginning of the line. 
  5844. After typing M-x lclint, you will be prompted for a compile command.  Enter the 
  5845. command identically to the command that would be used to run LCLint from the 
  5846. command line.  If errors are found, M-x next-lclint-error jumps to the point 
  5847. where the next error was found.  (Note, this only works if +showcolumn  is set 
  5848. to make LCLint include column numbers in error messages.) 
  5849.  
  5850. The command can be bound to a key to enable rapid jumping through the error 
  5851. messages.  For example, to set the key do CTRL-backslash add this line to your 
  5852. .emacs file: 
  5853.  
  5854.    (global-set-key "^\" 'next-lclint-error)
  5855.  
  5856. Editing Abbreviations 
  5857.  
  5858. An additional file, emacs/lclint-abbrevs contains abbreviations for LCLint 
  5859. syntactic comments and annotations.  If it is loaded, the comment surrounding 
  5860. an LCLint annotation will be added automatically.  For example, typing "only" 
  5861. and a space, will produce "/*@only@*/ ". Abbreviations are provided for each 
  5862. LCLint syntactic comment.  The abbreviation of  /*@null@*/ is nll (not null), 
  5863. since it is often necessary to type NULL. 
  5864.  
  5865. Abbreviations are loaded and used when a .c or .h file is edited by adding 
  5866. these lines to your .emacs file: 
  5867.  
  5868. (quietly-read-abbrev-file "<directory>/lclint-abbrevs") 
  5869.  
  5870. (setq c-mode-hook (function (lambda nil (abbrev-mode 1)))) 
  5871.  
  5872. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  5873.  
  5874.  David Evans 
  5875. Systematic Program Development 
  5876. evs@larch.lcs.mit.edu 
  5877.  
  5878.  
  5879. ΓòÉΓòÉΓòÉ 1.19. Figures ΓòÉΓòÉΓòÉ
  5880.  
  5881.  
  5882.  
  5883. Figures 
  5884.  
  5885.  
  5886. Figure 1.  Effort/benefit curve for LCLint.   (not available in HTML format) 
  5887. Figure 2.  Violations using abstract types. 
  5888. Figure 3.  Boolean checking. 
  5889. Figure 4.  Modifies checking. 
  5890. Figure 5.  Globals checking. 
  5891. Figure 6.  Deallocation errors. 
  5892. Figure 7.  Stack references. 
  5893. Figure 8.  Implicit annotations. 
  5894. Figure 9.  Reference counting. 
  5895. Figure 10.  Unique parameters. 
  5896. Figure 11.  Returned parameters. 
  5897. Figure 12.  Exposure checking. 
  5898. Figure 13.  Use before definition. 
  5899. Figure 14.  Annotated globals lists. 
  5900. Figure 15.  Null checking. 
  5901. Figure 16.  Using notnull. 
  5902. Figure 17.  Special Clauses. 
  5903. Figure 18.  Naming checks. 
  5904. Figure 19.  Evaluation order 
  5905. Figure 20.  Infinite loop checking 
  5906. Figure 21.  Switch checking. 
  5907. Figure 22.  Statements with no effect. 
  5908. Figure 23.  Ignored return values. 
  5909.  
  5910. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  5911.  
  5912.  
  5913. Systematic Program Development 
  5914. evs@larch.lcs.mit.edu 
  5915.  
  5916.  
  5917. ΓòÉΓòÉΓòÉ 1.19.1. Figure 2.  Violations using abstract types. ΓòÉΓòÉΓòÉ
  5918.  
  5919.  
  5920.  
  5921. palindrome.c 
  5922.  
  5923. #include "bool.h"
  5924. #include "mstring.h"
  5925.  
  5926. bool isPalindrome (mstring s)
  5927. {
  5928.    char *current = (char *) s;
  5929.    int i, len = (int) strlen (s);
  5930.  
  5931.    for (i = 0; i <= (len+1)/2; i++)
  5932.      {
  5933.         if (current[i] != s[len-i-1])
  5934.            return FALSE;
  5935.      }
  5936.    return TRUE;
  5937. }
  5938.  
  5939. bool callPal (void)
  5940. {
  5941.    return (isPalindrome ("bob"));
  5942. }
  5943.  
  5944.  
  5945.  
  5946.  
  5947.  
  5948.  
  5949.  
  5950. LCLint Output 
  5951.  
  5952. LCLint 2.2 --- 25 Aug 96
  5953.  
  5954. palindrome.c: (in function isPalindrome)
  5955. palindrome.c:6,29: Cast from underlying abstract type
  5956.                       mstring: (char *)s
  5957.   An abstraction barrier is broken. If necessary, use
  5958.   /*@access @*/ to allow access to an abstract
  5959.   type. (-abstract will suppress message)
  5960. palindrome.c:7,31: Function strlen expects arg 1 to be
  5961.                       char * gets mstring: s
  5962.   Underlying types match, but mstring is an abstract
  5963.   type that is not accessible here.
  5964. palindrome.c:11,27: Array fetch from non-array
  5965.                        (mstring): s[len - i - 1]
  5966.   Types are incompatible. (-type will suppress
  5967.   message)
  5968. palindrome.c: (in function callPal)
  5969. palindrome.c:19,26: Function isPalindrome expects arg
  5970.     1 to be mstring gets char *: "bob"
  5971.   Underlying types match, but mstring is an abstract
  5972.   type that is not accessible here.
  5973.  
  5974. Finished LCLint checking --- 4 code errors found
  5975.  David Evans 
  5976. Systematic Program Development 
  5977. evs@larch.lcs.mit.edu 
  5978.  
  5979.  
  5980. ΓòÉΓòÉΓòÉ 1.19.1.1. bool.h ΓòÉΓòÉΓòÉ
  5981.  
  5982.  
  5983.  
  5984. bool.h 
  5985.  
  5986. #ifndef BOOL_H
  5987. #define BOOL_H
  5988.  
  5989. #ifndef FALSE
  5990. #define FALSE 0
  5991. #endif
  5992.  
  5993. #ifndef TRUE
  5994. #define TRUE (! FALSE)
  5995. #endif
  5996.  
  5997. typedef int bool;
  5998.  
  5999. # define bool_initMod()
  6000. # define bool_unparse(b) ((b) ? "true" : "false" )
  6001. # define bool_not(b) ((b) ? FALSE : TRUE)
  6002. # define bool_equal(a,b) ((a) ? (b) : !(b))
  6003.  
  6004. # endif
  6005.  
  6006.  
  6007.  
  6008.  
  6009.  
  6010.  
  6011.  
  6012.  
  6013. ΓòÉΓòÉΓòÉ 1.19.1.2. mstring.h ΓòÉΓòÉΓòÉ
  6014.  
  6015.  
  6016.  
  6017. mstring.h 
  6018.  
  6019. typedef /*@abstract@*/ char *mstring;
  6020.  
  6021.  
  6022.  
  6023.  
  6024.  
  6025.  
  6026.  
  6027.  
  6028. ΓòÉΓòÉΓòÉ 1.19.2. Figure 3.  Boolean checking. ΓòÉΓòÉΓòÉ
  6029.  
  6030.  
  6031.  
  6032. bool.c 
  6033.  
  6034. #include "bool.h"
  6035.  
  6036. int f (int i, char *s,
  6037.        bool b1, bool b2)
  6038. {
  6039.   if (i = 3)
  6040.     return b1;
  6041.   if (!i || s)
  6042.     return i;
  6043.   if (s)
  6044.     return 7;
  6045.   if (b1 == b2)
  6046.     return 3;
  6047.   return 2;
  6048. }
  6049.  
  6050.  
  6051.  
  6052.  
  6053. LCLint Output 
  6054.  
  6055. LCLint 2.2 --- 25 Aug 96
  6056.  
  6057. bool.c: (in function f)
  6058. bool.c:7,12: Return value type bool does not match
  6059.                 declared type int: b1
  6060.   To make bool and int types equivalent, use +boolint.
  6061. bool.c:6,7: Test expression for if is assignment
  6062.                expression: i = 3
  6063.   The condition test is an assignment expression.
  6064.   Probably, you mean to use == instead of =. If an
  6065.   assignment is intended, add an extra parentheses
  6066.   nesting (e.g., if ((a = b)) ...) to suppress this
  6067.   message. (-predassign will suppress message)
  6068. bool.c:6,7: Test expression for if not bool, type int:
  6069.                i = 3
  6070.   Test expression type is not boolean or int.
  6071.   (-predboolint will suppress message)
  6072. bool.c:8,8: Operand of ! is non-boolean (int): !i
  6073.   The operand of a boolean operator is not a boolean.
  6074.   Use +ptrnegate to allow ! to be used on pointers.
  6075.   (-boolops will suppress message)
  6076. bool.c:8,13: Right operand of || is non-boolean (char
  6077.                 *): !i || s
  6078. bool.c:10,7: Test expression for if not bool, type
  6079.                 char *: s
  6080.   Test expression type is not boolean. (-predboolptr
  6081.   will suppress message)
  6082. bool.c:12,7: Use of == with bool variables (risks
  6083.     inconsistency because of multiple true values):
  6084.     b1 == b2
  6085.   Two bool values are compared directly using a C
  6086.   primitive. This may produce unexpected results since
  6087.   all non-zero values are considered TRUE, so
  6088.   different TRUE values may not be equal. The file
  6089.   bool.h (included in lclint/lib) provides bool_equal
  6090.   for safe bool comparisons. (-boolcompare will
  6091.   suppress message)
  6092.  
  6093. Finished LCLint checking --- 7 code errors found
  6094.  David Evans 
  6095. Systematic Program Development 
  6096. evs@larch.lcs.mit.edu 
  6097.  
  6098.  
  6099. ΓòÉΓòÉΓòÉ 1.19.3. Figure 4.  Modifies checking. ΓòÉΓòÉΓòÉ
  6100.  
  6101.  
  6102.  
  6103. modify.c 
  6104.  
  6105. void setx (int *x, int *y)
  6106.   /*@modifies *x@*/
  6107. {
  6108.   *y = *x;
  6109. }
  6110.  
  6111. void sety (int *x, int *y)
  6112.    /*@modifies *y@*/
  6113. {
  6114.    setx (y, x);
  6115. }
  6116.  
  6117.  
  6118.  
  6119. LCLint Output 
  6120.  
  6121. LCLint 2.2 --- 25 Aug 96
  6122.  
  6123. modify.c: (in function setx)
  6124. modify.c:4,3: Undocumented modification of *y: *y = *x
  6125.   An externally-visible object is modified by a
  6126.   function, but not listed in its modifies clause.
  6127.   (-mods will suppress message)
  6128. modify.c:5,1: Suspect object listed in modifies of
  6129.                  setx not modified: *x
  6130.   An object listed in the modifies clause is not
  6131.   modified by the implementation of the function. The
  6132.   modification may not be detected if it is done
  6133.   through a call to an unspecified function. (-mustmod
  6134.   will suppress message)
  6135.    modify.c:1,6: Declaration of setx
  6136. modify.c:1,6: Function setx exported but not declared
  6137.                  in header file
  6138.   A declaration is exported, but does not appear in a
  6139.   header file. (-exportheader will suppress message)
  6140.    modify.c:5,1: Definition of setx
  6141. modify.c:7,6: Function sety exported but not declared
  6142.                  in header file
  6143.    modify.c:11,1: Definition of sety
  6144.  
  6145. Finished LCLint checking --- 4 code errors found
  6146.  David Evans 
  6147. Systematic Program Development 
  6148. evs@larch.lcs.mit.edu 
  6149.  
  6150.  
  6151. ΓòÉΓòÉΓòÉ 1.19.4. Figure 5.  Globals checking. ΓòÉΓòÉΓòÉ
  6152.  
  6153.  
  6154.  
  6155. globals.c 
  6156.  
  6157. int glob1, glob2;
  6158.  
  6159. int f (void) /*@globals glob1;@*/
  6160. {
  6161.    return glob2;
  6162. }
  6163.  
  6164.  
  6165. LCLint Output 
  6166.  
  6167. LCLint 2.2 --- 25 Aug 96
  6168.  
  6169. globals.c: (in function f)
  6170. globals.c:5,11: Undocumented use of global glob2
  6171.   A checked global variable is used in the function,
  6172.   but not listed in its globals clause. By default,
  6173.   only globals specified in .lcl files are checked. To
  6174.   check all globals, use +allglobals. To check globals
  6175.   selectively use /*@checked@*/ in the global
  6176.   declaration. (-globs will suppress message)
  6177. globals.c:3,5: Global glob1 listed but not used
  6178.   A global variable listed in the function's globals
  6179.   list is not used in the body of the function.
  6180.   (-globuse will suppress message)
  6181. globals.c:1,5: Variable glob1 exported but not
  6182.                   declared in header file
  6183.   A variable declaration is exported, but does not
  6184.   appear in a header file. (Used with exportheader.)
  6185.   (-exportheadervar will suppress message)
  6186. globals.c:1,12: Variable glob2 exported but not
  6187.                    declared in header file
  6188. globals.c:3,5: Function f exported but not declared in
  6189.                   header file
  6190.   A declaration is exported, but does not appear in a
  6191.   header file. (-exportheader will suppress message)
  6192.    globals.c:6,1: Definition of f
  6193.  
  6194. Finished LCLint checking --- 5 code errors found
  6195.  David Evans 
  6196. Systematic Program Development 
  6197. evs@larch.lcs.mit.edu 
  6198.  
  6199.  
  6200. ΓòÉΓòÉΓòÉ 1.19.5. Figure 6.  Deallocation errors. ΓòÉΓòÉΓòÉ
  6201.  
  6202.  
  6203.  
  6204. only.c 
  6205.  
  6206. extern /*@only@*/ int *glob;
  6207.  
  6208. /*@only@*/ int *
  6209.   f (/*@only@*/ int *x, int *y,
  6210.      int *z)
  6211.   /*@globals int *glob;@*/
  6212. {
  6213.   int *m = (int *)
  6214.     malloc (sizeof (int));
  6215.  
  6216.   glob = y;
  6217.   free (x);
  6218.   *m = *x;
  6219.   return z;
  6220. }
  6221.  
  6222.  
  6223.  
  6224. LCLint Output 
  6225.  
  6226. LCLint 2.2 --- 25 Aug 96
  6227.  
  6228. only.c: (in function f)
  6229. only.c:11,3: Only storage glob not released before
  6230.                 assignment: glob = y
  6231.   A memory leak has been detected. Newly-allocated or
  6232.   only-qualified storage is not released before the
  6233.   last reference to it is lost. (-mustfree will
  6234.   suppress message)
  6235.    only.c:1,24: Storage glob becomes only
  6236. only.c:11,3: Implicitly temp storage y assigned to
  6237.                 only: glob = y
  6238.   Temp storage (associated with a formal parameter) is
  6239.   transferred to a non-temporary reference. The
  6240.   storage may be released or new aliases created.
  6241.   (-temptrans will suppress message)
  6242. only.c:13,4: Dereference of possibly null pointer m:
  6243.                 *m
  6244.   A possibly null pointer is dereferenced.  Value is
  6245.   either the result of a function which may return
  6246.   null (in which case, code should check it is not
  6247.   null), or a global, parameter or structure field
  6248.   declared with the null qualifier. (-nullderef will
  6249.   suppress message)
  6250.    only.c:8,12: Storage m may become null
  6251. only.c:13,9: Variable x used after being released
  6252.   Memory is used after it has been released (either by
  6253.   passing as an only param or assigning to and only
  6254.   global. (-usereleased will suppress message)
  6255.    only.c:12,9: Storage x released
  6256. only.c:14,10: Implicitly temp storage z returned as
  6257.                  only: z
  6258. only.c:14,12: Fresh storage m not released before
  6259.                  return
  6260.    only.c:9,27: Fresh storage m allocated
  6261.  
  6262. Finished LCLint checking --- 6 code errors found
  6263.  David Evans 
  6264. Systematic Program Development 
  6265. evs@larch.lcs.mit.edu 
  6266.  
  6267.  
  6268. ΓòÉΓòÉΓòÉ 1.19.6. Figure 7.  Stack references. ΓòÉΓòÉΓòÉ
  6269.  
  6270.  
  6271.  
  6272. stack.c 
  6273.  
  6274. int *glob;
  6275.  
  6276. /*@dependent@*/
  6277. int *f (int **x)
  6278. {
  6279.   int sa[2] = { 0, 1 };
  6280.   int loc = 3;
  6281.  
  6282.   glob = &loc;
  6283.   *x = &sa[0];
  6284.  
  6285.   return &loc;
  6286. }
  6287.  
  6288.  
  6289.  
  6290. LCLint Output 
  6291.  
  6292. LCLint 2.2 --- 25 Aug 96
  6293.  
  6294. stack.c: (in function f)
  6295. stack.c:12,10: Stack-allocated storage &loc reachable
  6296.                   from return value: &loc
  6297.   A stack reference is pointed to by an external
  6298.   reference when the function returns. The
  6299.   stack-allocated storage is destroyed after the call,
  6300.   leaving a dangling reference. (-stackref will
  6301.   suppress message)
  6302. ;stack.c:12,15: Stack-allocated storage *x reachable
  6303.                   from parameter x
  6304.    stack.c:10,3: Storage *x becomes stack
  6305. stack.c:12,15: Stack-allocated storage glob reachable
  6306.                   from global glob
  6307.    stack.c:9,3: Storage glob becomes stack
  6308.  
  6309. Finished LCLint checking --- 3 code errors found
  6310.  David Evans 
  6311. Systematic Program Development 
  6312. evs@larch.lcs.mit.edu 
  6313.  
  6314.  
  6315. ΓòÉΓòÉΓòÉ 1.19.7. Figure 8.  Implicit Annotations. ΓòÉΓòÉΓòÉ
  6316.  
  6317.  
  6318.  
  6319. implicit.c 
  6320.  
  6321. typedef struct {
  6322.   /* only */ char *name;  /* implicit only annotation if +structimponly */
  6323.   int val;
  6324. } *rec;
  6325.  
  6326. extern /* only */ rec rec_last ; /* implicit only
  6327. annotation if +globimponly */
  6328.  
  6329. extern /* only */ rec   /* implicit if +retimponly */
  6330.   rec_create (/* temp */ char *name, /* implicit if +paramimptemp */
  6331.               int val);
  6332.  
  6333.  
  6334. ΓòÉΓòÉΓòÉ 1.19.8. Figure 9.  Reference counting. ΓòÉΓòÉΓòÉ
  6335.  
  6336.  
  6337.  
  6338. rstring.c 
  6339.  
  6340. #include "rstring.h"
  6341.  
  6342. static rstring rstring_ref (rstring r)
  6343. {
  6344.   r->refs++;
  6345.   return r;
  6346. }
  6347.  
  6348. rstring rstring_first (rstring r1, rstring r2)
  6349. {
  6350.   if (strcmp (r1->contents, r2->contents) < 0)
  6351. ;    {
  6352.       return r1;
  6353.     }
  6354.   else
  6355.     {
  6356.       return rstring_ref (r2);
  6357.     }
  6358. }
  6359.  
  6360.  
  6361. LCLint Output 
  6362.  
  6363. LCLint 2.2 --- 25 Aug 96
  6364.  
  6365. rstring.c: (in function rstring_first)
  6366. rstring.c:13,14: Reference counted storage returned
  6367.     without modifying reference count: r1
  6368.   Reference counted storage is transferred in a way
  6369.   that may not be consistent with the reference count.
  6370.   (-refcounttrans will suppress message)
  6371.  
  6372. Finished LCLint checking --- 1 code error found
  6373.  David Evans 
  6374. Systematic Program Development 
  6375. evs@larch.lcs.mit.edu 
  6376.  
  6377.  
  6378. ΓòÉΓòÉΓòÉ 1.19.8.1. rstring.h ΓòÉΓòÉΓòÉ
  6379.  
  6380.  
  6381.  
  6382. rstring.h 
  6383.  
  6384. typedef /*@abstract@*/ /*@refcounted@*/ struct {
  6385.    /*@refs@*/ int refs;
  6386.    char *contents;
  6387. } *rstring;
  6388.  
  6389.  
  6390.  
  6391.  
  6392.  
  6393.  
  6394.  
  6395.  
  6396.  
  6397.  
  6398.  
  6399.  
  6400.  
  6401.  
  6402.  
  6403.  
  6404.  
  6405.  
  6406.  
  6407.  
  6408.  
  6409.  
  6410.  
  6411.  
  6412.  
  6413.  
  6414.  
  6415.  
  6416.  
  6417.  
  6418.  
  6419.  
  6420.  
  6421.  
  6422.  
  6423.  
  6424.  
  6425.  
  6426.  
  6427.  
  6428.  
  6429.  
  6430.  
  6431.  
  6432.  
  6433.  
  6434.  
  6435.  
  6436.  
  6437.  
  6438.  
  6439.  
  6440.  
  6441.  
  6442.  
  6443.  
  6444.  
  6445.  
  6446.  
  6447.  
  6448.  
  6449.  
  6450. ΓòÉΓòÉΓòÉ 1.19.9. Figure 10.  Unique parameters. ΓòÉΓòÉΓòÉ
  6451.  
  6452.  
  6453.  
  6454. unique.c 
  6455.  
  6456. # include <string.h>
  6457. ;
  6458. void
  6459. capitalize (/*@out@*/ char *s,
  6460.             char *t)
  6461. {
  6462.   strcpy (s, t);
  6463.   *s = toupper (*s);
  6464. }
  6465.  
  6466.  
  6467. LCLint Output 
  6468.  
  6469. LCLint 2.2 --- 25 Aug 96
  6470.  
  6471. unique.c: (in function capitalize)
  6472. unique.c:7,11: Parameter 1 (s) to function strcpy is
  6473.     declared unique but may be aliased externally by
  6474.     parameter 2 (t)
  6475.   A unique or only parameter may be aliased by some
  6476.   other parameter or visible global. (-mayaliasunique
  6477.   will suppress message)
  6478.  
  6479. Finished LCLint checking --- 1 code error found
  6480.  David Evans 
  6481. Systematic Program Development 
  6482. evs@larch.lcs.mit.edu 
  6483.  
  6484.  
  6485. ΓòÉΓòÉΓòÉ 1.19.10. Figure 11.  Returned parameters. ΓòÉΓòÉΓòÉ
  6486.  
  6487.  
  6488.  
  6489. returned.c 
  6490.  
  6491. #include "intSet.h"
  6492.  
  6493. extern intSet intSet_insert
  6494.    (/*@returned@*/ intSet s, int x);
  6495.  
  6496. /*
  6497. ** with returned, no error is reported, since the same
  6498. ** storage is returned from insert, and returned
  6499. ** from intSet_singleton as an implicit only result.
  6500. */
  6501.  
  6502. intSet intSet_singleton (int x)
  6503. {
  6504.    return (intSet_insert (intSet_new (), x));
  6505.  }
  6506.  
  6507. /*
  6508. ** without returned:
  6509. */
  6510.  
  6511. extern intSet intSet_insert2 (intSet s, int x);
  6512.  
  6513. intSet intSet_singleton2 (int x)
  6514. {
  6515.   return (intSet_insert2 (intSet_new (), x));
  6516. }
  6517.  
  6518.  
  6519. LCLint Output 
  6520.  
  6521. LCLint 2.2 --- 25 Aug 96
  6522.  
  6523. returned.c: (in function intSet_singleton2)
  6524. returned.c:25,27: New fresh storage passed as
  6525.     implicitly temp (not released): intSet_new()
  6526.   A memory leak has been detected. Newly-allocated or
  6527.   only-qualified storage is not released before the
  6528.   last reference to it is lost. (-mustfree will
  6529.   suppress message)
  6530.  
  6531. Finished LCLint checking --- 1 code error found
  6532.  David Evans 
  6533. Systematic Program Development 
  6534. evs@larch.lcs.mit.edu 
  6535.  
  6536.  
  6537. ΓòÉΓòÉΓòÉ 1.19.10.1. intSet.h ΓòÉΓòÉΓòÉ
  6538.  
  6539.  
  6540.  
  6541. intSet.h 
  6542.  
  6543. typedef /*@abstract@*/ struct
  6544. {
  6545.   int nelements;
  6546.   int *elements;
  6547. } *intSet ;
  6548.  
  6549. extern intSet intSet_new (void);
  6550.  
  6551.  
  6552.  
  6553.  
  6554.  
  6555.  
  6556.  
  6557.  
  6558.  
  6559.  
  6560.  
  6561.  
  6562.  
  6563.  
  6564.  
  6565.  
  6566.  
  6567.  
  6568.  
  6569.  
  6570.  
  6571.  
  6572.  
  6573.  
  6574.  
  6575.  
  6576.  
  6577.  
  6578.  
  6579.  
  6580.  
  6581.  
  6582.  
  6583.  
  6584.  
  6585.  
  6586.  
  6587.  
  6588.  
  6589.  
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.  
  6598.  
  6599.  
  6600.  
  6601.  
  6602.  
  6603.  
  6604.  
  6605.  
  6606.  
  6607.  
  6608.  
  6609.  
  6610. ΓòÉΓòÉΓòÉ 1.19.11. Figure 12.  Exposure checking. ΓòÉΓòÉΓòÉ
  6611.  
  6612.  
  6613.  
  6614. exposure.c 
  6615.  
  6616. #include "employee.h"
  6617.  
  6618. char *
  6619. employee_getName (employee e)
  6620. {
  6621.   return e->name;
  6622. }
  6623.  
  6624. /*@observer@*/ char *
  6625. employee_obsName (employee e)
  6626. { return e->name; }
  6627.  
  6628. /*@exposed@*/ char *
  6629. employee_exposeName (employee e)
  6630. { return e->name; }
  6631.  
  6632. void
  6633. employee_capName (employee e)
  6634. {
  6635.   char *name;
  6636.  
  6637.   name = employee_obsName (e);
  6638.   *name = toupper (*name);
  6639. }
  6640.  
  6641.  
  6642.  
  6643.  
  6644. LCLint Output 
  6645.  
  6646. LCLint 2.2 --- 25 Aug 96
  6647.  
  6648. exposure.c: (in function employee_getName)
  6649. exposure.c:6,10: Function returns reference to
  6650.                     parameter e: e->name
  6651.   The returned value shares storage with a parameter
  6652.   or global. If a parameter is to be returned, use the
  6653.   returned qualifier. If the result is not modified,
  6654.   use the observer qualifier on the result type.
  6655.   Otherwise, exposed can be used, but limited checking
  6656.   is done. (-retalias will suppress message)
  6657. exposure.c:6,10: Return value exposes rep of employee:
  6658.                     e->name
  6659.   The return value shares storage with an instance of
  6660.   an abstract type. This means clients may have access
  6661.   to a pointer into the abstract representation. Use
  6662.   the observer qualifier to return exposed storage
  6663.   that may not be modified by the client. Use the
  6664.   exposed qualifier to return modifiable (but not
  6665.   deallocatable) exposed storage (dangerous).
  6666.   (-retexpose will suppress message)
  6667. exposure.c:6,18: Released storage e->name reachable
  6668.                     from parameter at return point
  6669.   Memory is used after it has been released (either by
  6670.   passing as an only param or assigning to and only
  6671.   global. (-usereleased will suppress message)
  6672.    exposure.c:6,10: Storage e->name is released
  6673. exposure.c: (in function employee_capName)
  6674. exposure.c:23,3: Suspect modification of observer
  6675.                     name: *name = toupper(*name)
  6676.   Storage declared with observer is possibly modified.
  6677.   Observer storage may not be modified. (-modobserver
  6678.   will suppress message)
  6679. exposure.c:4,1: Function employee_getName exported but
  6680.                    not declared in header file
  6681.   A declaration is exported, but does not appear in a
  6682.   header file. (-exportheader will suppress message)
  6683.    exposure.c:7,1: Definition of employee_getName
  6684. exposure.c:10,1: Function employee_obsName exported
  6685.                     but not declared in header file
  6686.    exposure.c:11,19: Definition of employee_obsName
  6687. exposure.c:14,1: Function employee_exposeName exported
  6688.                     but not declared in header file
  6689.    exposure.c:15,19: Definition of employee_exposeName
  6690. exposure.c:18,1: Function employee_capName exported
  6691.                     but not declared in header file
  6692.    exposure.c:24,1: Definition of employee_capName
  6693.  
  6694. Finished LCLint checking --- 8 code errors found
  6695.  David Evans 
  6696. Systematic Program Development 
  6697. evs@larch.lcs.mit.edu 
  6698.  
  6699.  
  6700. ΓòÉΓòÉΓòÉ 1.19.11.1. employee.h ΓòÉΓòÉΓòÉ
  6701.  
  6702.  
  6703.  
  6704. employee.h 
  6705.  
  6706. typedef /*@abstract@*/ struct
  6707. {
  6708.   char *name;
  6709.   int *id;
  6710. } *employee;
  6711.  
  6712.  
  6713.  
  6714.  
  6715.  
  6716.  
  6717.  
  6718.  
  6719.  
  6720.  
  6721.  
  6722.  
  6723.  
  6724.  
  6725.  
  6726.  
  6727.  
  6728.  
  6729.  
  6730.  
  6731.  
  6732.  
  6733.  
  6734.  
  6735.  
  6736.  
  6737.  
  6738.  
  6739.  
  6740.  
  6741.  
  6742.  
  6743.  
  6744.  
  6745.  
  6746.  
  6747.  
  6748.  
  6749.  
  6750.  
  6751.  
  6752.  
  6753.  
  6754.  
  6755.  
  6756.  
  6757.  
  6758.  
  6759.  
  6760.  
  6761.  
  6762.  
  6763.  
  6764.  
  6765.  
  6766.  
  6767.  
  6768.  
  6769.  
  6770.  
  6771. ΓòÉΓòÉΓòÉ 1.19.12. Figure 13.  Use before definition. ΓòÉΓòÉΓòÉ
  6772.  
  6773.  
  6774.  
  6775. usedef.c 
  6776.  
  6777. extern void
  6778.   setVal (/*@out@*/ int *x);
  6779. extern int
  6780.   getVal (/*@in@*/ int *x);
  6781. extern int mysteryVal (int *x);
  6782.  
  6783. int
  6784. dumbfunc (/*@out@*/ int *x, int i)
  6785. {
  6786.   if (i > 3)
  6787. ;    return *x;
  6788.   else if (i > 1)
  6789. ;    return getVal (x);
  6790.   else if (i == 0)
  6791.     return mysteryVal (x);
  6792.   else
  6793.     {
  6794.       setVal (x);
  6795.       return *x;
  6796.     }
  6797. }
  6798.  
  6799.  
  6800. LCLint Output 
  6801.  
  6802. LCLint 2.2 --- 25 Aug 96
  6803.  
  6804. usedef.c: (in function dumbfunc)
  6805. usedef.c:11,12: Value *x used before definition
  6806.   An rvalue is used that may not be initialized to a
  6807.   value on some execution path. (-usedef will suppress
  6808.   message)
  6809. usedef.c:13,20: Passed storage x not completely
  6810.     defined (*x is undefined): getVal (x)
  6811.   Storage derivable from a parameter, return value or
  6812.   global is not defined. Use /*@out@*/ to denote
  6813.   passed or returned storage which need not be
  6814.   defined. (-compdef will suppress message)
  6815. usedef.c:15,24: Passed storage x not completely
  6816.     defined (*x is undefined): mysteryVal (x)
  6817.  
  6818. Finished LCLint checking --- 3 code errors found
  6819.  David Evans 
  6820. Systematic Program Development 
  6821. evs@larch.lcs.mit.edu 
  6822.  
  6823.  
  6824. ΓòÉΓòÉΓòÉ 1.19.13. Figure 14.  Annotated Globals Lists. ΓòÉΓòÉΓòÉ
  6825.  
  6826.  
  6827.  
  6828. annotglobs.c 
  6829.  
  6830. int globnum;
  6831.  
  6832. struct {
  6833.   char *firstname;
  6834.   char *lastname;
  6835.   int id;
  6836. } globname;
  6837.  
  6838. void
  6839. initialize (/*@only@*/ char *name)
  6840.   /*@globals undef globnum,
  6841.              undef globname @*/
  6842. {
  6843.   globname.id = globnum;
  6844.   globname.lastname = name;
  6845. }
  6846.  
  6847. void finalize (void)
  6848.    /*@globals killed globname@*/
  6849. {
  6850.   free (globname.lastname);
  6851. }
  6852.  
  6853.  
  6854. LCLint Output 
  6855.  
  6856. LCLint 2.2 --- 25 Aug 96
  6857.  
  6858. annotglobs.c: (in function initialize)
  6859. annotglobs.c:14,17: Undef global globnum used before
  6860.                        definition
  6861.   An rvalue is used that may not be initialized to a
  6862.   value on some execution path. (-usedef will suppress
  6863.   message)
  6864. annotglobs.c:16,2: Global storage globname contains 1
  6865.     undefined field when call returns: firstname
  6866.   Storage derivable from a parameter, return value or
  6867.   global is not defined. Use /*@out@*/ to denote
  6868.   passed or returned storage which need not be
  6869.   defined. (-compdef will suppress message)
  6870. annotglobs.c: (in function finalize)
  6871. annotglobs.c:22,2: Only storage globname.firstname
  6872.     (type char *) derived from killed global is not
  6873.     released (memory leak)
  6874.   A storage leak due to incomplete deallocation of a
  6875.   structure or deep pointer is suspected. Unshared
  6876.   storage that is reachable from a reference that is
  6877.   being deallocated has not yet been deallocated.
  6878.   LCLint assumes when an object is passed as an out
  6879.   only void pointer that the outer object will be
  6880.   deallocated, but the inner objects will not.
  6881.   (-compdestroy will suppress message)
  6882.  
  6883. Finished LCLint checking --- 3 code errors found
  6884.  David Evans 
  6885. Systematic Program Development 
  6886. evs@larch.lcs.mit.edu 
  6887.  
  6888.  
  6889. ΓòÉΓòÉΓòÉ 1.19.14. Figure 15.  Null checking. ΓòÉΓòÉΓòÉ
  6890.  
  6891.  
  6892.  
  6893. null.c 
  6894.  
  6895. char firstChar1 (/*@null@*/ char *s)
  6896. {
  6897.   return *s;
  6898. }
  6899.  
  6900. char firstChar2 (/*@null@*/ char *s)
  6901. {
  6902.   if (s == NULL) return '\0';
  6903.   return *s;
  6904. }
  6905.  
  6906.  
  6907. LCLint Output 
  6908.  
  6909. LCLint 2.2 --- 25 Aug 96
  6910.  
  6911. null.c: (in function firstChar1)
  6912. null.c:3,11: Dereference of possibly null pointer s:
  6913.                 *s
  6914.   A possibly null pointer is dereferenced.  Value is
  6915.   either the result of a function which may return
  6916.   null (in which case, code should check it is not
  6917.   null), or a global, parameter or structure field
  6918.   declared with the null qualifier. (-nullderef will
  6919.   suppress message)
  6920.    null.c:1,35: Storage s may become null
  6921.  
  6922. Finished LCLint checking --- 1 code error found
  6923.  David Evans 
  6924. Systematic Program Development 
  6925. evs@larch.lcs.mit.edu 
  6926.  
  6927.  
  6928. ΓòÉΓòÉΓòÉ 1.19.15. Figure 16.  Using notnull. ΓòÉΓòÉΓòÉ
  6929.  
  6930.  
  6931.  
  6932. mstringnn.c 
  6933.  
  6934. typedef /*@abstract@*/ /*@null@*/ char *mstring;
  6935.  
  6936. static mstring mstring_createNew (int x) ;
  6937.  
  6938. mstring mstring_space1 (void)
  6939. {
  6940.   mstring m = mstring_createNew (1);
  6941.  
  6942.   /* error, since m could be NULL */
  6943.   *m = ' '; *(m + 1) = '\0';
  6944.   return m;
  6945. }
  6946.  
  6947. static /*@notnull@*/ mstring mstring_createNewNN (int x) ;
  6948.  
  6949. mstring mstring_space2 (void)
  6950. {
  6951.   mstring m = mstring_createNewNN (1);
  6952.  
  6953.   /* no error, because of notnull annotation */
  6954.   *m = ' '; *(m + 1) = '\0';
  6955.   return m;
  6956. }
  6957.  
  6958.  
  6959. LCLint Output 
  6960.  
  6961. LCLint 2.2 --- 25 Aug 96
  6962.  
  6963. mstringnn.c: (in function mstring_space1)
  6964. mstringnn.c:10,4: Dereference of possibly null pointer
  6965.                      m: *m
  6966.   A possibly null pointer is dereferenced.  Value is
  6967.   either the result of a function which may return
  6968.   null (in which case, code should check it is not
  6969.   null), or a global, parameter or structure field
  6970.   declared with the null qualifier. (-nullderef will
  6971.   suppress message)
  6972.    mstringnn.c:7,15: Storage m may become null
  6973.  
  6974. Finished LCLint checking --- 1 code error found
  6975.  David Evans 
  6976. Systematic Program Development 
  6977. evs@larch.lcs.mit.edu 
  6978.  
  6979.  
  6980. ΓòÉΓòÉΓòÉ 1.19.16. Figure 17.  Special Clauses ΓòÉΓòÉΓòÉ
  6981.  
  6982.  
  6983.  
  6984. special.c 
  6985.  
  6986. typedef struct
  6987. {
  6988.   int id;
  6989.   /*@only@*/ char *name;
  6990. } *record;
  6991.  
  6992. static /*@special@*/ record record_new (void)
  6993.   /*@defines result->id@*/
  6994. {
  6995.   record r = (record) malloc (sizeof (*r));
  6996.  
  6997.   assert (r != NULL);
  6998.   r->id = 3;
  6999.   return r;
  7000. }
  7001.  
  7002. static void record_setName (/*@special@*/ record r, /*@only@*/ char *name)
  7003.    /*@defines r->name@*/
  7004. {
  7005.   r->name = name;
  7006. }
  7007.  
  7008. record record_create (/*@only@*/ char *name)
  7009. {
  7010.   record r = record_new ();
  7011.   record_setName (r, name);
  7012.   return r;
  7013. }
  7014.  
  7015. void record_clearName (/*@special@*/ record r)
  7016.    /*@releases r->name@*/
  7017.    /*@post:isnull r->name@*/
  7018. {
  7019.   free (r->name);
  7020.   r->name = NULL;
  7021. }
  7022.  
  7023. void record_free (/*@only@*/ record r)
  7024. {
  7025.   record_clearName (r);
  7026.   free (r);
  7027. }
  7028.  
  7029.  
  7030.  
  7031.  
  7032.  
  7033.  David Evans 
  7034. Systematic Program Development 
  7035. evs@larch.lcs.mit.edu 
  7036.  
  7037.  
  7038. ΓòÉΓòÉΓòÉ 1.19.17. Figure 18.  Naming Checks ΓòÉΓòÉΓòÉ
  7039.  
  7040.  
  7041.  
  7042. names.c 
  7043.  
  7044. char *stringreverse (char *s);
  7045.  
  7046. int f (int x)
  7047. {
  7048.   int lookalike = 1;
  7049.   int looka1ike = 2;
  7050.  
  7051.   if (x > 3)
  7052. ;    {
  7053.       int x = lookalike;
  7054.       x += looka1ike;
  7055.     }
  7056.  
  7057.   return x;
  7058. }
  7059.  
  7060.  
  7061. LCLint Output 
  7062.  
  7063. LCLint 2.2 --- 25 Aug 96
  7064.  
  7065. names.c:1,7: Name stringreverse is reserved for future
  7066.     ANSI library extensions.  Functions that begin
  7067.     with "str" and a lowercase letter may be added to
  7068.      or . (See ANSI, Section
  7069.     4.13.7)
  7070.   External name is reserved for system in ANSI
  7071.   standard. (-ansireserved will suppress message)
  7072. names.c: (in function f)
  7073. names.c:6,7: Internal identifier looka1ike is not
  7074.     distinguishable from lookalike except by lookalike
  7075.     characters
  7076.   An internal name is not distinguishable from another
  7077.   internal name using the number of significant
  7078.   characters. According to ANSI Standard (3.1), an
  7079.   implementation may only consider the first 31
  7080.   characters significant. The +internalnamelen
  7081.   flag changes the number of significant characters,
  7082.   -internalnamecaseinsensitive to makes alphabetical
  7083.   case significant, and +internalnamelookalike to make
  7084.   similar-looking characters non-distinct.
  7085.   (-distinctinternalnames will suppress message)
  7086.    names.c:5,7: Declaration of lookalike
  7087. names.c:10,11: Variable x shadows outer declaration
  7088.   An outer declaration is shadowed by the local
  7089.   declaration. (-shadow will suppress message)
  7090.    names.c:3,12: Previous declaration of x: int
  7091.  
  7092. Finished LCLint checking --- 3 code errors found
  7093.  David Evans 
  7094. Systematic Program Development 
  7095. evs@larch.lcs.mit.edu 
  7096.  
  7097.  
  7098. ΓòÉΓòÉΓòÉ 1.19.18. Figure 19.  Evaluation Order ΓòÉΓòÉΓòÉ
  7099.  
  7100.  
  7101.  
  7102. order.c 
  7103.  
  7104. extern int glob;
  7105.  
  7106. extern int mystery (void);
  7107.  
  7108. extern int modglob (void)
  7109.    /*@globals glob@*/
  7110.    /*@modifies glob@*/ ;
  7111.  
  7112. int f (int x, int y[])
  7113. {
  7114.   int i = x++ * x;
  7115.  
  7116.   y[i] = i++;
  7117.   i += modglob() * glob;
  7118.   i += mystery() * glob;
  7119.   return i;
  7120. }
  7121.  
  7122.  
  7123. LCLint Output 
  7124.  
  7125. LCLint 2.2 --- 25 Aug 96
  7126.  
  7127. order.c: (in function f)
  7128. order.c:11,17: Expression has undefined behavior
  7129.     (value of right operand modified by left operand):
  7130.     x++ * x
  7131.   Code has unspecified behavior. Order of evaluation
  7132.   of function parameters or subexpressions is not
  7133.   defined, so if a value is used and modified in
  7134.   different places not separated by a sequence point
  7135.   constraining evaluation order, then the result of
  7136.   the expression is unspecified. (-evalorder will
  7137.   suppress message)
  7138. order.c:13,11: Expression has undefined behavior (left
  7139.     operand uses i, modified by right operand):
  7140.     y[i] = i++
  7141. order.c:14,20: Expression has undefined behavior
  7142.     (value of right operand modified by left operand):
  7143.     modglob() * glob
  7144. order.c:15,20: Expression has undefined behavior
  7145.     (unconstrained function mystery used in left
  7146.     operand may set global variable glob used in right
  7147.     operand): mystery() * glob
  7148.   Code involving a call to function with no modifies
  7149.   or globals clause may have undefined or
  7150.   implementation-dependent behavior (LCLint assumes
  7151.   the unconstrained call may modify any reachable
  7152.   state or use any global). Add a specification for
  7153.   the function. (-evalorderuncon will suppress
  7154.   message)
  7155.  
  7156. Finished LCLint checking --- 4 code errors found
  7157.  David Evans 
  7158. Systematic Program Development 
  7159. evs@larch.lcs.mit.edu 
  7160.  
  7161.  
  7162. ΓòÉΓòÉΓòÉ 1.19.19. Figure 20.  Infinite loop checking ΓòÉΓòÉΓòÉ
  7163.  
  7164.  
  7165.  
  7166. loop.c 
  7167.  
  7168. extern int glob1, glob2;
  7169.  
  7170. extern int f (void)
  7171.   /*@globals glob1@*/
  7172.   /*@modifies nothing@*/ ;
  7173.  
  7174. extern void g (void)
  7175.   /*@modifies glob2@*/ ;
  7176.  
  7177. extern void h (void) ;
  7178.  
  7179. void upto (int x)
  7180. {
  7181.   while (x > f()) g();
  7182.   while (f() < 3) h();
  7183. }
  7184.  
  7185.  
  7186. LCLint Output 
  7187.  
  7188. LCLint 2.2 --- 25 Aug 96
  7189.  
  7190. loop.c: (in function upto)
  7191. loop.c:14,10: Suspected infinite loop.  No value used
  7192.     in loop test (x, glob1) is modified by test or
  7193.     loop body.
  7194.   This appears to be an infinite loop. Nothing in the
  7195.   body of the loop or the loop test modifies the value
  7196.   of the loop test. Perhaps the specification of a
  7197.   function called in the loop body is missing a
  7198.   modification. (-infloops will suppress message)
  7199.  
  7200. Finished LCLint checking --- 1 code error found
  7201.  David Evans 
  7202. Systematic Program Development 
  7203. evs@larch.lcs.mit.edu 
  7204.  
  7205.  
  7206. ΓòÉΓòÉΓòÉ 1.19.20. Figure 21.  Switch checking. ΓòÉΓòÉΓòÉ
  7207.  
  7208.  
  7209.  
  7210. switch.c 
  7211.  
  7212. typedef enum {
  7213.   YES, NO, DEFINITELY,
  7214.   PROBABLY, MAYBE } ynm;
  7215.  
  7216. void decide (ynm y)
  7217. {
  7218.   switch (y)
  7219.     {
  7220.     case PROBABLY:
  7221.     case NO: printf ("No!");
  7222.     case MAYBE: printf ("Maybe");
  7223.          /*@fallthrough@*/
  7224.     case YES: printf ("Yes!");
  7225.     }
  7226. }
  7227.  
  7228.  
  7229. LCLint Output 
  7230.  
  7231. LCLint 2.2 --- 25 Aug 96
  7232.  
  7233. noeffect.c: (in function noeffect)
  7234. noeffect.c:6,3: Statement has no effect: y == *x
  7235.   Statement has no visible effect --- no values are
  7236.   modified. (-noeffect will suppress message)
  7237. noeffect.c:7,3: Statement has no effect: nomodcall(x)
  7238. noeffect.c:8,3: Statement has no effect (possible
  7239.     undected modification through call to
  7240.     unconstrained function mysterycall):
  7241.     mysterycall(x)
  7242.   Statement has no visible effect --- no values are
  7243.   modified. It may modify something through a call to
  7244.   an unconstrained function. (-noeffectuncon will
  7245.   suppress message)
  7246.  
  7247. Finished LCLint checking --- 3 code errors found
  7248.  David Evans 
  7249. Systematic Program Development 
  7250. evs@larch.lcs.mit.edu 
  7251.  
  7252.  
  7253. ΓòÉΓòÉΓòÉ 1.19.21. Figure 22.  Statements with no effect. ΓòÉΓòÉΓòÉ
  7254.  
  7255.  
  7256.  
  7257. noeffect.c 
  7258.  
  7259. extern void nomodcall (int *x) /*@*/;
  7260. extern void mysterycall (int *x);
  7261.  
  7262. int noeffect (int *x, int y)
  7263. {
  7264.   y == *x;
  7265.   nomodcall (x);
  7266.   mysterycall (x);
  7267.   return *x;
  7268. }
  7269.  
  7270.  
  7271. LCLint Output 
  7272.  
  7273. LCLint 2.2 --- 25 Aug 96
  7274.  
  7275. noeffect.c: (in function noeffect)
  7276. noeffect.c:6,3: Statement has no effect: y == *x
  7277.   Statement has no visible effect --- no values are
  7278.   modified. (-noeffect will suppress message)
  7279. noeffect.c:7,3: Statement has no effect: nomodcall(x)
  7280. noeffect.c:8,3: Statement has no effect (possible
  7281.     undected modification through call to
  7282.     unconstrained function mysterycall):
  7283.     mysterycall(x)
  7284.   Statement has no visible effect --- no values are
  7285.   modified. It may modify something through a call to
  7286.   an unconstrained function. (-noeffectuncon will
  7287.   suppress message)
  7288.  
  7289. Finished LCLint checking --- 3 code errors found
  7290.  David Evans 
  7291. Systematic Program Development 
  7292. evs@larch.lcs.mit.edu  /html> 
  7293.  
  7294.  
  7295. ΓòÉΓòÉΓòÉ 1.19.22. Figure 23.  Ignored return values. ΓòÉΓòÉΓòÉ
  7296.  
  7297.  
  7298.  
  7299. ignore.c 
  7300.  
  7301. extern int fi (void);
  7302. extern bool fb (void);
  7303. extern int /*@alt void@*/
  7304.   fv (void);
  7305.  
  7306. int ignore (void)
  7307. {
  7308.   fi ();
  7309.   (void) fi ();
  7310.   fb ();
  7311.   fv ();
  7312.   return fv ();
  7313. }
  7314.  
  7315.  
  7316. LCLint Output 
  7317.  
  7318. LCLint 2.0 --- 28 Feb 96
  7319.  
  7320. ignore.c: (in function ignore)
  7321. ignore.c:8,3: Return value (type int) ignored: fi()
  7322.   Result returned by function call is not used.  If
  7323.   this is intended, can cast result to (void) to
  7324.   eliminate message.  Use -retvalint to suppress
  7325.   message.
  7326. ignore.c:10,3: Return value (type bool) ignored: fb()
  7327.   Result returned by function call is not used.  If
  7328.   this is intended, can cast result to (void) to
  7329.   eliminate message.  Use -retvalbool to suppress
  7330.   message.
  7331.  
  7332. Finished LCLint checking --- 2 code errors found
  7333.  David Evans 
  7334. Systematic Program Development 
  7335. evs@larch.lcs.mit.edu 
  7336.  
  7337.  
  7338. ΓòÉΓòÉΓòÉ 1.20. LCLint User's Guide - References ΓòÉΓòÉΓòÉ
  7339.  
  7340.  
  7341.  
  7342. References 
  7343.  
  7344.  
  7345.  
  7346. LCLint 
  7347.  
  7348.  [Evans94] David Evans. Using specifications to check source code. MIT/LCS/TR 
  7349. 628, Laboratory for Computer Science, MIT, June 1994. 
  7350.  
  7351. SM Thesis.  Describes research behind LCLint, focusing on how specifications 
  7352. can be exploited to do lightweight checking.  Includes case studies using 
  7353. LCLint. 
  7354.  
  7355.  [EGHT94] David Evans, John Guttag, Jim Horning and Yang Meng Tan. LCLint: A 
  7356. tool for using specifications to check code.  SIGSOFT Symposium on the 
  7357. Foundations of Software Engineering, December 1994. 
  7358.  
  7359. Introduction to LCLint.  Shows how LCLint is used to find errors in a sample 
  7360. program. 
  7361.  
  7362.  [Evans96] David Evans. Static Detection of Dynamic Memory Errors.  In SIGPLAN 
  7363. Conference on Programming Language Design and Implementation (PLDI '96), 
  7364. Philadelphia, PA., May 1996. 
  7365.  
  7366. Describes approach for exploiting annotations added to code to detect a wide 
  7367. class of errors.  Focuses on checks described in Sections 5-7 of this guide. 
  7368.  
  7369. Larch 
  7370.  
  7371.  [GH93] Guttag, John V. and Horning, James J., with Stephen J. Garland, Kevin 
  7372. D. Jones, AndrΓòös Modet, and Jeannette M. Wing, Larch: Languages and Tools for 
  7373. Formal Specification, Springer-Verlag, Texts and Monographs in Computer 
  7374. Science, 1993. 
  7375.  
  7376. Overview of the Larch family of specification languages and related tools. 
  7377. Includes a chapter on LCL, the Larch C interface language, on which LCLint is 
  7378. based. 
  7379.  
  7380.  [Tan95] Tan, Yang Meng.  Formal Specification Techniques for Engineering 
  7381. Modular C, Kluwer International Series in Software Engineering, Volume 1, 
  7382. Kluwer Academic Publishers, Boston, 1995. 
  7383.  
  7384. Modified and updated version of MIT Ph. D. dissertation, previously published 
  7385. as MIT/LCS/TR-619, 1994.  Includes presentation of the semantics of LCL and a 
  7386. case study using LCL. 
  7387.  
  7388.  
  7389.  [ANSI] American National Standard for Information Systems, Programming 
  7390. Language, C.  ANSI X3.159-1989.  (Believed to be identical to ISO/IEC 
  7391. 9899:1990). 
  7392.  
  7393. Specification for C programming language.  LCLint aims to be consistent with 
  7394. this document.   [Hat95] Hatton, Les.  Safer C: Developing Software for 
  7395. High-integrity and Safety-critical Systems. McGraw-Hill International Series in 
  7396. Software Engineering, 1995. 
  7397.  
  7398. A broad work on all aspects of developing safety-critical software, focusing on 
  7399. the C language.  Provides good justification for the use of C in 
  7400. safety-critical systems, and the necessity of tool-supported programming 
  7401. standards.  LCLint users will be interested to see how many of the errors 
  7402. listed as only being dynamically detectable can be detected statically by 
  7403. LCLint.   [KR88] Kernighan, Brian W. and Ritchie, Dennis M.  The C Programming 
  7404. Language, second edition.  Prentice Hall, New Jersey, 1988. 
  7405.  
  7406. Standard reference for ANSI C.  If you haven't heard of this one, you probably 
  7407. didn't get this far (unless you started at the back).  [vdL94] Van der Linden, 
  7408. Peter.  Expert C Programming:  Deep C Secrets. SunSoft Press, Prentice Hall, 
  7409. New Jersey,  1994. 
  7410.  
  7411. Filled with useful information on the darker corners of C, as well as lots of 
  7412. industry anecdotes and humor.  LCLint's reserved name checking is loosely based 
  7413. on the list of reserved names in this book. 
  7414.  
  7415. Abstract Types 
  7416.  
  7417.  [LG86] Liskov, Barbara. and Guttag, John V.  Abstraction and Specification in 
  7418. Program Development, MIT Press, Cambridge, MA, 1986. 
  7419.  
  7420. Describes a programming methodology using abstract types and specified 
  7421. interfaces.  Much of the methodology upon which LCLint is based comes from this 
  7422. book. Uses the CLU programming language. 
  7423.  
  7424. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  7425.  
  7426.  
  7427. Systematic Program Development 
  7428. evs@larch.lcs.mit.edu 
  7429.  
  7430.  
  7431. ΓòÉΓòÉΓòÉ 1.21. Acknowledgements ΓòÉΓòÉΓòÉ
  7432.  
  7433.  
  7434.  
  7435. Acknowledgements 
  7436.  
  7437.  
  7438.  John Guttag and Jim Horning had the original idea for LCLint, have provided 
  7439. valuable advice on its functionality and design, and been instrumental in its 
  7440. development.  This work has also benefited greatly from discussions with Mike 
  7441. Burrows, Stephen Garland, Colin Godfrey, Steve Harrison, Daniel Jackson, 
  7442. Angelika Leeb, Ulana Legedza, Raymie Stata, Yang Meng Tan, and Mark 
  7443. Vandevoorde. I especially thank Angelika Leeb for many constructive comments on 
  7444. improving the User's Guide, Raymie Stata for help designing and setting up the 
  7445. web site and Mark Vandevoorde for technical assistance. 
  7446.  
  7447.  Much of LCLint's development has been driven by feedback from users in 
  7448. academia and industry.  Many more people than I can mention here have made 
  7449. contributions by suggesting improvements, reporting bugs, porting early 
  7450. versions of LCLint to other platforms.  Particularly heroic contributions have 
  7451. been made by Eric Bloodworth, Jutta Degener, Rick Farnbach, Chris Flatters, 
  7452. Huver Hu, John Gerard Malecki, Thomas G. McWilliams, Michael Meskes, Richard 
  7453. O'Keefe, Jens Schweikhardt, and Albert L. Ting.  Martin "Herbert" Dietze and 
  7454. Mike Smith performed valiantly in producing the Win32 and OS2 ports. 
  7455.  
  7456.  LCLint incorporates the original LCL checker developed by Yang Meng Tan.  This 
  7457. was built on the DECspec Project (Joe Wild, Gary Feldman, Steve Garland, and 
  7458. Bill McKeeman).  The LSL checker used by LCLint was developed by Steve Garland. 
  7459. The original C grammar for LCLint was provided by Nate Osgood. 
  7460.  
  7461.  This research was supported by grants from ARPA (N0014-92-J-1795), NSF 
  7462. (9115797-CCR) and DEC ERP.  David Evans is supported by an Intel Foundation 
  7463. Fellowship.  LCLint is developed on DEC 3000/500 and DECmips machines provided 
  7464. by Digital Equipment Corporation and Pentium Pro (tm) machines donated by Intel 
  7465. Corporation.  This document was produced using Pentium (tm) and Pentium Pro 
  7466. (tm) Computers donated by Intel Corporation and Microsoft Office (tm) software 
  7467. donated by Microsoft. 
  7468.  
  7469. If you are listed here, and want me to add a link to your homepage, send me 
  7470. email. 
  7471.  
  7472. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  7473.  
  7474.  
  7475. Systematic Program Development 
  7476. evs@larch.lcs.mit.edu 
  7477.  
  7478.  
  7479. ΓòÉΓòÉΓòÉ 2. Footnotes ΓòÉΓòÉΓòÉ
  7480.  
  7481.  
  7482.  
  7483. Footnotes 
  7484.  
  7485.  1 Lint is a common programming tool for detecting anomalies in C programs. 
  7486. The original lint was developed by S. C. Johnson in the late seventies, mainly 
  7487. because early versions of C did not support function prototypes. 
  7488.  
  7489.  2 Another way to provide extra information about code is to use formal 
  7490. specifications (Appendix G). 
  7491.  
  7492.  3 Unlike regular C comments, control comments should not be used within a 
  7493. single token.  They may introduce new separators in the code during parsing. 
  7494.  
  7495.  4 For abstract types whose instances can change value, a client does need to 
  7496. know if assignment has copy or sharing semantics (see Section 3.2). 
  7497.  
  7498.  5 Does not apply to HTML version. italics. 
  7499.  
  7500.  6 The meta-notation, item,+ is used to denote a comma separated list of items. 
  7501. For example, /*@access mstring, intSet@*/ provides access to the 
  7502. representations of both mstring and intSet.) 
  7503.  
  7504.  7 Through the parameter.  Modifications using some other variable that has a 
  7505. pointer to the location of this parameter are not considered. 
  7506.  
  7507.  8 The flag -booltype can be used to select a different name for the boolean 
  7508. type.  To change the names of TRUE and FALSE, use -booltrue  and -boolfalse. 
  7509. The LCLint distribution includes an implementation of bool, in lib/bool.h. 
  7510. However, it isn't necessary to use this implementation to get the benefits of 
  7511. boolean checking. 
  7512.  
  7513.  9 This means that theoreticians can prove that no algorithm exists that solves 
  7514. the problem correctly for all possible programs. 
  7515.  
  7516.  10 This section is largely based on [Evans96].  It semi-formally defines some 
  7517. of the terms needed to describe memory management checking;  if you are 
  7518. satisfied with an intuitive understanding of these terms, this section may be 
  7519. skipped. 
  7520.  
  7521.  11 This is similar to the LISP storage model, except that objects are typed. 
  7522.  
  7523.  12 Except sizeof, which does not need the value of its argument. 
  7524.  
  7525.  13 If the storage is not assigned to a reference, an internal reference is 
  7526. created to track the storage. 
  7527.  
  7528.  14 The full declaration of malloc also includes a null annotation (Section 
  7529. 7.2) to indicate that the result may be NULL (as it is when the requested 
  7530. storage cannot be allocated) and an out annotation (Section 7.1) to indicate 
  7531. that the result points to undefined storage. 
  7532.  
  7533.  15 The full declaration of free also has out and null annotations on the 
  7534. parameter to indicate that the argument may be NULL and need not point to 
  7535. defined storage.  According to [ANSI, 4.10.3.2], NULL may be passed to free 
  7536. without an error.  On some UNIX platforms, passing NULL to free causes a 
  7537. program crash so the UNIX version of the standard library (Appendix F) 
  7538. specifies free without the null annotation on its parameter. To check that 
  7539. allocated objects are completely destroyed (e.g., all unshared objects inside a 
  7540. structure are deallocated before the structure is deallocated), LCLint checks 
  7541. that any parameter passed as an out only void * does not contain references to 
  7542. live, unshared objects.  This makes sense, since such a parameter could not be 
  7543. used sensibly in any way other than deallocating its storage. 
  7544.  
  7545.  16 If an exposure qualifier is used (see Section 6.2), the implied dependent 
  7546. annotation is used instead of the more generally implied only annotation. 
  7547.  
  7548.  17 Strictly, we should also check that the returned observer storage is not 
  7549. used again after any other calls to the abstract type module using the same 
  7550. parameter.  LCLint does not attempt to check this, and in practice it is not 
  7551. usually a problem. 
  7552.  
  7553.  18 Note that if the parameter is annotated with only, it is not an error to 
  7554. assign it to part of an abstract representation, since the caller may not use 
  7555. the storage after the call returns. 
  7556.  
  7557.  19 That is, the return type is bool, or int if +boolint is used. 
  7558.  
  7559.  20 The sef annotation denotes a parameter as side-effect free (see Section 
  7560. 8.2.1). By declaring the argument to assert to be side-effect free, LCLint will 
  7561. report errors if the parameter to assert produces a side-effect.  This is 
  7562. especially pertinent if assertions are turned off when the production version 
  7563. is compiled. The bool /*@alt int@*/ type specifier for the parameter means the 
  7564. parameter type must match either bool or int. Alternate types are described in 
  7565. Section 8.2.2. 
  7566.  
  7567.  21 To be completely correct, all the macro parameters should be evaluated 
  7568. before the macro has any side-effects.  Since checking this would require 
  7569. extensive analysis for occasional modest gain, it was not considered worth 
  7570. implementing. 
  7571.  
  7572.  22 Note that functions which do not produce to the same result each time they 
  7573. are called with the same arguments should be declared to modify internalState 
  7574. so they  will lead to errors if they are passed as sef parameters. 
  7575.  
  7576.  23 The most renown C naming convention is the Hungarian naming convention, 
  7577. introduced by Charles Simonyi [Simonyi, Charles, and Martin Heller.  "The 
  7578. Hungarian Revolution."  BYTE, August 1991, p. 131-38].  The names for LCLint 
  7579. naming conventions follow the tradition of using Central European nationalities 
  7580. as mnemonics for naming conventions.  The LCLint conventions are similar to the 
  7581. Hungarian naming convention in that they encode type information in names, 
  7582. except that the LCLint conventions encode the names of accessible abstract 
  7583. types instead of the type of the declaration of return value. Prefixes used in 
  7584. the Hungarian naming convention are not supported by LCLint. 
  7585.  
  7586.  24 Namespace prefixes should probably be described by regular expressions. 
  7587. LCLint uses a simpler, more limited means for describing names, which is 
  7588. believed to be adequate for describing most useful naming conventions.  If 
  7589. there is sufficient interest, regular expressions may be supported in a future 
  7590. version of LCLint. 
  7591.  
  7592.  25 Peter van der Linden estimates that default fall through is the wrong 
  7593. behavior 97% of the time.  [vdL95, p. 37] 
  7594.  
  7595.  26 "Software Glitch Cripples AT&T Network", Telephony, 22 January 1990. 
  7596.  
  7597.  27 In earlier versions of LCLint, the default extension .lldmp was used.  This 
  7598. has been shortened to .lcd. 
  7599.  
  7600. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  7601.  
  7602.  
  7603.  
  7604. ΓòÉΓòÉΓòÉ 3. External links ΓòÉΓòÉΓòÉ
  7605.  
  7606. This chapter contains all external links referenced in this book - either link 
  7607. is an Unified Resource Locator (URL) or simply to a local file which is not a 
  7608. part of this book. 
  7609.  
  7610.  
  7611. ΓòÉΓòÉΓòÉ 3.1. http://larch-www.lcs.mit.edu:8001/ ΓòÉΓòÉΓòÉ
  7612.  
  7613.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       The link you selected points to an external resource. Click the URL below to launch IBM Web Explorer
  7614.  
  7615.                        http://larch-www.lcs.mit.edu:8001/
  7616.  
  7617.  
  7618. ΓòÉΓòÉΓòÉ 3.2. http://larch-www.lcs.mit.edu:8001/larch/lclint/index.html ΓòÉΓòÉΓòÉ
  7619.  
  7620.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       The link you selected points to an external resource. Click the URL below to launch IBM Web Explorer
  7621.  
  7622.             http://larch-www.lcs.mit.edu:8001/larch/lclint/index.html
  7623.  
  7624.  
  7625. ΓòÉΓòÉΓòÉ 3.3. mailto:evs@larch.lcs.mit.edu ΓòÉΓòÉΓòÉ
  7626.  
  7627.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       The link you selected points to an external resource. Click the URL below to launch IBM Web Explorer
  7628.  
  7629.                           mailto:evs@larch.lcs.mit.edu
  7630.  
  7631.  
  7632. ΓòÉΓòÉΓòÉ 3.4. http://larch-www.lcs.mit.edu:8001/larch/lclint/run.html ΓòÉΓòÉΓòÉ
  7633.  
  7634.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       The link you selected points to an external resource. Click the URL below to launch IBM Web Explorer
  7635.  
  7636.              http://larch-www.lcs.mit.edu:8001/larch/lclint/run.html
  7637.  
  7638.  
  7639. ΓòÉΓòÉΓòÉ 3.5. http://larch-www.lcs.mit.edu:8001/~evs ΓòÉΓòÉΓòÉ
  7640.  
  7641.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       The link you selected points to an external resource. Click the URL below to launch IBM Web Explorer
  7642.  
  7643.                      http://larch-www.lcs.mit.edu:8001/~evs
  7644.  
  7645.  
  7646. ΓòÉΓòÉΓòÉ 3.6. http://larch-www.lcs.mit.edu:8001/~evs/pldi96-abstract.html ΓòÉΓòÉΓòÉ
  7647.  
  7648.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       The link you selected points to an external resource. Click the URL below to launch IBM Web Explorer
  7649.  
  7650.            http://larch-www.lcs.mit.edu:8001/~evs/pldi96-abstract.html
  7651.  
  7652.  
  7653. ΓòÉΓòÉΓòÉ 3.7. http://larch-www.lcs.mit.edu:8001/~evs/sigsoft94.html ΓòÉΓòÉΓòÉ
  7654.  
  7655.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       The link you selected points to an external resource. Click the URL below to launch IBM Web Explorer
  7656.  
  7657.               http://larch-www.lcs.mit.edu:8001/~evs/sigsoft94.html
  7658.  
  7659.  
  7660. ΓòÉΓòÉΓòÉ 3.8. http://larch-www.lcs.mit.edu:8001/~evs/tr-628.html ΓòÉΓòÉΓòÉ
  7661.  
  7662.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       The link you selected points to an external resource. Click the URL below to launch IBM Web Explorer
  7663.  
  7664.                http://larch-www.lcs.mit.edu:8001/~evs/tr-628.html
  7665.  
  7666.  
  7667. ΓòÉΓòÉΓòÉ 3.9. http://larch-www.lcs.mit.edu:8001/~guttag/ ΓòÉΓòÉΓòÉ
  7668.  
  7669.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       The link you selected points to an external resource. Click the URL below to launch IBM Web Explorer
  7670.  
  7671.                    http://larch-www.lcs.mit.edu:8001/~guttag/
  7672.  
  7673.  
  7674. ΓòÉΓòÉΓòÉ 3.10. http://larch-www.lcs.mit.edu:8001/~mtv ΓòÉΓòÉΓòÉ
  7675.  
  7676.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       The link you selected points to an external resource. Click the URL below to launch IBM Web Explorer
  7677.  
  7678.                      http://larch-www.lcs.mit.edu:8001/~mtv
  7679.  
  7680.  
  7681. ΓòÉΓòÉΓòÉ 3.11. http://reality.sgi.com/employees/horning_mti/home.html ΓòÉΓòÉΓòÉ
  7682.  
  7683.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       The link you selected points to an external resource. Click the URL below to launch IBM Web Explorer
  7684.  
  7685.              http://reality.sgi.com/employees/horning_mti/home.html
  7686.  
  7687.  
  7688. ΓòÉΓòÉΓòÉ 3.12. http://www.digital.com/ ΓòÉΓòÉΓòÉ
  7689.  
  7690.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       The link you selected points to an external resource. Click the URL below to launch IBM Web Explorer
  7691.  
  7692.                              http://www.digital.com/
  7693.  
  7694.  
  7695. ΓòÉΓòÉΓòÉ 3.13. http://www.lcs.mit.edu/ ΓòÉΓòÉΓòÉ
  7696.  
  7697.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       The link you selected points to an external resource. Click the URL below to launch IBM Web Explorer
  7698.  
  7699.                              http://www.lcs.mit.edu/
  7700.  
  7701.  
  7702. ΓòÉΓòÉΓòÉ 3.14. mailto:lclint-bug@larch.lcs.mit.edu ΓòÉΓòÉΓòÉ
  7703.  
  7704.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       The link you selected points to an external resource. Click the URL below to launch IBM Web Explorer
  7705.  
  7706.                        mailto:lclint-bug@larch.lcs.mit.edu
  7707.  
  7708.  
  7709. ΓòÉΓòÉΓòÉ 3.15. mailto:lclint@larch.lcs.mit.edu ΓòÉΓòÉΓòÉ
  7710.  
  7711.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       The link you selected points to an external resource. Click the URL below to launch IBM Web Explorer
  7712.  
  7713.                          mailto:lclint@larch.lcs.mit.edu
  7714.  
  7715.  
  7716. ΓòÉΓòÉΓòÉ 3.16. news:comp.specification.larch ΓòÉΓòÉΓòÉ
  7717.  
  7718.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       The link you selected points to an external resource. Click the URL below to launch IBM Web Explorer
  7719.  
  7720.                           news:comp.specification.larch
  7721.