Version 5 of SLOC

Updated 2002-06-26 03:12:37

Source Lines of Code


Description

Counting of SLOC is used for "software metrics tool" or "software measurement tool". Many software programs are quoted based on SLOC count.

There are two possible SLOC definitions, physical or logical. The physical SLOC definition is based on Dr. Barry Boehm's [L1 ] Deliverable Source Instruction (DSI). It is programming language syntax independent, which enables it to collect other useful informatin such as comments, blank lines, and overall size, all independent of information content. The logical SLOC definitions will vary depending on the programming language due to language-specific syntax. The logical SLOC definitions are derived from the SEI's Code Counting Standard [L2 ].


Tools

SLOCCount [L3 ] supports 27 differnent languages (including Tcl) and comes in source and RPMs (a MsWindows install requires Cygwin). Counts only physical SLOC.

CodeCount [L4 ] supports 9+ different languages (not Tcl) and is distributed as ANSI C code under a USC Limited Public License. Counts physical and logical SLOC.

TSA [L5 ] which comes as part of the new fickle package counts physical lines of comments, logical lines of code, and function invocations in Tcl code. (This is the only pure Tcl package that I know that does Tcl SLOC)