LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 10-28-2008, 12:24 PM   #1
jmb.filter
LQ Newbie
 
Registered: Oct 2008
Posts: 2

Rep: Reputation: 0
Logical SLOC counting tool?


Hi,

I need a tool to count Logical SLOC. I already use sloc_c for physical source lines of code counting, but that doesn't get me the logical. Anyone know of a Linux based tool for this?

Google finds me tons of Windows GUI based Logical SLOC counters, but I need something for Linux. I can use one of the GUI based ones that have Java as the backend and then go off and install the necessary java components on Linux to run it, but I am neither skilled enough nor have enough time to play around with that one.

Any suggestions?

Thanks.

Edit:
Well, I found a solution myself that is acceptable. A sloc counter that does logical and physical. It is written in C and I had to change a parameter or two in the C file, then compile with GCC. It seems to work decently, although it reports slightly higher numbers than my Windows based version. If you need it, I found it at: http://sunset.usc.edu/research/CODECOUNT/download.html

Last edited by jmb.filter; 10-29-2008 at 10:20 AM. Reason: Found Answer
 
Old 10-29-2008, 11:40 PM   #2
normscherer
Member
 
Registered: Sep 2005
Location: On the road
Distribution: Ubuntu 8.10
Posts: 40

Rep: Reputation: 15
What does a "logical sloc counter count"? semi-colons? Anything you count will be more or less meaningless depending on what you are trying to do with the results and how well the assumptions of the counter agree with how your code is structured.
 
Old 10-30-2008, 09:28 AM   #3
jmb.filter
LQ Newbie
 
Registered: Oct 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Well, to answer what it counts, I don't think it goes by semi-colons exactly, but similar idea. An if statement with the { on the next line will count as 1 logical statement rather than the physical 2. Depending on which sloc counter you use, the else part of the if may or may not be counted as a separate logical statement.

What are we trying to do with the results? Management is trying to find a better way of gauging effort for cost estimation of future jobs. The claim here is that physical sloc makes it seem like a lot more work/effort is happening than is truly the case.

Anybody have any better answers?



Quote:
Originally Posted by normscherer View Post
What does a "logical sloc counter count"? semi-colons? Anything you count will be more or less meaningless depending on what you are trying to do with the results and how well the assumptions of the counter agree with how your code is structured.
 
  


Reply

Tags
logical, tool


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a tool that can read a corrupted logical disk drive HGeneAnthony Linux - General 2 07-04-2006 01:19 AM
Network counting tool xonner Linux - Networking 1 04-16-2006 01:12 PM
Physical vs. logical SLOC liguorir Programming 0 06-01-2004 08:04 PM
Counting SLOC of multiple files uraja Linux - Newbie 1 09-12-2003 07:12 PM
counting tool stand Linux - Software 3 08-23-2003 12:54 AM


All times are GMT -5. The time now is 02:32 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration