 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
idesilva@eudoramail.com Guest
|
Posted: Tue Jun 07, 2005 1:12 pm Post subject: Static analysis tools...? |
|
|
Hi,
My company is in the process of evaluating some static analysis tools.
Our requirement is to find a tool that will automate part of the code
reviewing activity, especially things like coding standards compliance
checks, uninitialized varabiles etc.
We are considering two tools. "C++ Test" from Parasoft and "QAC++" from
Programming Research.
I would appreciate if someone could share their experiences with these
tools and recommend me which one is better. If you know of any other
better tools please provide references.
Thanks in advance,
Ishan.
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
pavana.murthy@gmail.com Guest
|
Posted: Thu Jun 09, 2005 9:37 am Post subject: Re: Static analysis tools...? |
|
|
I think you can consider CodeWizard(I think its from Parasoft),
RuleWizard tools along with ofcourse Lint which will warn of NULL
pointer assignment, uninitialized variables etc.
I used all these above in my projects and are very useful.
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
mlimber Guest
|
Posted: Thu Jun 09, 2005 9:55 am Post subject: Re: Static analysis tools...? |
|
|
-- idesi... (AT) eudoramail (DOT) com wrote:
| Quote: | I would appreciate if someone could share their experiences with these
tools and recommend me which one is better. If you know of any other
better tools please provide references.
|
I have not used either of the products you mention, but I have used
PC-Lint/FlexeLint from Gimpel Software (http://www.gimpel.com) to great
effect. It takes a little bit of tinkering to get the feedback level to
what you'll want to use on a regular basis, but it will perform
top-notch static analysis to catch unintialized variables, potentially
null pointers, sign problems, and the like. It checks code for
conformance to the C++ standard and to various gurus' advice, but it
does not check for coding standards defined by your company
(formatting, naming conventions, disallowed techniques, etc.) unless
the item in question also fits in one of the areas mentioned above.
Gimpel Lint comes with configurations for most popular compilers, and
you can customize for specialized ones. There are also free tools
available to help with Gimpel Lint such as ALOA, which generates
statistics to evaluate your existing programs based on Lint messages.
See their website for more.
Cheers!
M
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Albrecht Fritzsche Guest
|
Posted: Fri Jun 10, 2005 10:26 am Post subject: Re: Static analysis tools...? |
|
|
| Quote: | I have not used either of the products you mention, but I have used
PC-Lint/FlexeLint from Gimpel Software (http://www.gimpel.com) to great
effect. It takes a little bit of tinkering to get the feedback level to
what you'll want to use on a regular basis, but it will perform
top-notch static analysis to catch unintialized variables
|
While I like PClint to catch for some potential errors, please don't
rely on its check for uninitialized member variables. This one is (at
least with the versions I have used) seriously broken.
It's probably a good idea to check first (with a evaluation copy or sth
similiar) if the tools fulfill what they promise by checking it with
some sample code.
Ali
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
mlimber Guest
|
Posted: Mon Jun 13, 2005 7:51 pm Post subject: Re: Static analysis tools...? |
|
|
--- Albrecht Fritzsche wrote:
| Quote: | While I like PClint to catch for some potential errors, please don't
rely on its check for uninitialized member variables. This one is (at
least with the versions I have used) seriously broken.
|
I have found PC-Lint to be of excellent quality, and I have not seen
the behavior you describe with the only version I have (8.00q). For
example, I ran this code through it with no command line switches:
class A
{
int i_;
public:
A() {}
};
and PC-Lint easily caught the uninitialized member variable. How is it
broken?
M
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Albrecht Fritzsche Guest
|
Posted: Wed Jun 15, 2005 9:34 am Post subject: Re: Static analysis tools...? |
|
|
| Quote: | class A {
int i_;
public:
A() {}
};
and PC-Lint easily caught the uninitialized member variable. How is it
broken?
|
Good question, I wasn't very expressive What is the result if you
run
class A {
public:
A() { init(); }
private:
int i_;
void init() {}
};
? The bug is that PClint assumes that any non-const member function
called from the constructor initializes everything, even if this very
function is simply empty. Changing the init() function to const gives
you the uninitialized error again.
Ali
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
mlimber Guest
|
Posted: Wed Jun 22, 2005 4:29 pm Post subject: Re: Static analysis tools...? |
|
|
-- Albrecht Fritzsche wrote:
| Quote: | What is the result if you run
class A {
public:
A() { init(); }
private:
int i_;
void init() {}
};
|
You are right that version 8.0q misses that bug. I asked Gimpel support
about the problem, and they sent me an alpha copy of their next
release, which has a fix for the problem. I tried running your code
through it, and it caught the bug with ease.
M
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Albrecht Fritzsche Guest
|
Posted: Thu Jun 23, 2005 9:36 am Post subject: Re: Static analysis tools...? |
|
|
mlimber wrote:
| Quote: | -- Albrecht Fritzsche wrote:
What is the result if you run
class A {
public:
A() { init(); }
private:
int i_;
void init() {}
};
You are right that version 8.0q misses that bug. I asked Gimpel support
about the problem, and they sent me an alpha copy of their next
release, which has a fix for the problem. I tried running your code
through it, and it caught the bug with ease.
|
Good news - i did the same (ie, filing a bug report, etc...) two years
ago w/o such a success.
Cheers,
Ali
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|