📄 tools.htm
字号:
<TD BGCOLOR="#FFFFCC"><NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=qacc" ONMOUSEOVER = "self.status = 'QA/C++ Home Page'; return true" ONMOUSEOUT = "self.status = self.defaultStatus" TARGET="_top">QA/C++</NOBR></A></TD>
<TD BGCOLOR="#FFFFCC" ALIGN=CENTER>Unix</TD></TR>
<TR><TD BGCOLOR="#FFFFCC"><NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=rational" ONMOUSEOVER = "self.status = 'Rational Software Home Page'; return true" ONMOUSEOUT = "self.status = self.defaultStatus" TARGET="_top">Rational</NOBR> Software</A></TD>
<TD BGCOLOR="#FFFFCC"><NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=apexcpp" ONMOUSEOVER = "self.status = 'Apex C/C++ Home Page'; return true" ONMOUSEOUT = "self.status = self.defaultStatus" TARGET="_top">Apex C/C++</NOBR></A></TD>
<TD BGCOLOR="#FFFFCC" ALIGN=CENTER>Unix</TD></TR>
<CAPTION ALIGN="top"><STRONG>Table 1:Static Analysis Tools for C++</STRONG></CAPTION>
</TABLE>
</CENTER>
<P><A NAME="dingp12"></A><A NAME="AUTO00008"></A>We then attempted to contact the vendors to get information on each
product. We were unable to get in touch with ConSol Software GmbH, so
we eliminated xlint++ from our study. [Note: after this article went to
press, ConSol Software GmbH contacted us, and we have included in <A HREF="TOOLS.HTM#table3" ONMOUSEOVER = "self.status = 'Table 3'; return true" ONMOUSEOUT = "self.status = self.defaultStatus">Table 3</A> the information they gave us.] We also eliminated Productivity through
Software's ProLint, because it is fundamentally a GUI wrapper around
Gimpel Software's (command-line based) FlexeLint, and we had already
decided to include FlexeLint in our <NOBR>examination.<SCRIPT>create_link(12);</SCRIPT>
</NOBR></P>
<P><A NAME="dingp13"></A><A NAME="AUTO00009"></A>That left us with the following seven <NOBR>products:<SCRIPT>create_link(13);</SCRIPT>
</NOBR></P>
<UL>
<A NAME="dingp14"></A><LI><A NAME="codecheck"></A><NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=codecheck" ONMOUSEOVER = "self.status = 'CodeCheck Home Page'; return true" ONMOUSEOUT = "self.status = self.defaultStatus" TARGET="_top">CodeCheck</NOBR></A> from
<NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=abraxas_software" ONMOUSEOVER = "self.status = 'Abraxas Software Home Page'; return true" ONMOUSEOUT = "self.status = self.defaultStatus" TARGET="_top">Abraxas</NOBR> Software</A>. CodeCheck is
a standalone product
that lets programmers use a C-like language to specify what kinds
of program analysis should be performed. It comes with several
predefined analysis programs, including some for computing program
complexity metrics and for identifying unportable code.<SCRIPT>create_link(14);</SCRIPT>
<A NAME="AUTO00010"></A>
<A NAME="dingp15"></A><LI><A NAME="acqua"></A><NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=acquaprova" ONMOUSEOVER = "self.status = 'AcquaProva Home Page'; return true" ONMOUSEOUT = "self.status = self.defaultStatus" TARGET="_top">AcquaProva</NOBR></A> (formerly
C++Expert)
from <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=centerline_software" ONMOUSEOVER = "self.status = 'CenterLine Software Home Page'; return true" ONMOUSEOUT = "self.status = self.defaultStatus" TARGET="_top">CenterLine</NOBR> Software</A>.
Also a standalone product,
AcquaProva performs static and dynamic analyses of C and C++
programs. Its static checks are drawn from Scott Meyers' <A HREF="../EC/INDEX.HTM" TARGET="_top" ONMOUSEOVER="self.status='Effective C++'; return true" ONMOUSEOUT = "self.status = self.defaultStatus"><I>Effective
C++</I></A> and <A HREF="../MEC/INDEX.HTM" TARGET="_top" ONMOUSEOVER="self.status='More Effective C++'; return true" ONMOUSEOUT = "self.status = self.defaultStatus"><I>More Effective C++</I></A>, and its diagnostics contain
hypertext links to on-line versions of those books.<SCRIPT>create_link(15);</SCRIPT>
<A NAME="AUTO00011"></A>
<A NAME="dingp16"></A><LI><A NAME="flexe"></A><NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=flexe_pc_lint" ONMOUSEOVER = "self.status = 'Flexe-/PC-Lint Home Page'; return true" ONMOUSEOUT = "self.status = self.defaultStatus" TARGET="_top">FlexeLint/PC-Lint</NOBR></A>
from <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=gimpel_software" ONMOUSEOVER = "self.status = 'Gimpel Software Home Page'; return true" ONMOUSEOUT = "self.status = self.defaultStatus" TARGET="_top">Gimpel</NOBR> Software</A>. Another standalone product
(the name is FlexeLint for Unix, PC-Lint for DOS, Windows, and
OS/2), FlexeLint/PC-Lint is perhaps truest to the classic <CODE>lint</CODE>
tradition. It can check for over 600 potential error conditions in
C and C++ source code, including conditions that affect more than
one translation unit or that require detailed data flow analysis.<SCRIPT>create_link(16);</SCRIPT>
<A NAME="AUTO00012"></A>
<A NAME="dingp17"></A><LI><A NAME="codeadvisor"></A><NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=codeadvisor" ONMOUSEOVER = "self.status = 'CodeAdvisor Home Page'; return true" ONMOUSEOUT = "self.status = self.defaultStatus" TARGET="_top">CodeAdvisor</NOBR></A>
from <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=hp" ONMOUSEOVER = "self.status = 'Hewlett Packard Home Page'; return true" ONMOUSEOUT = "self.status = self.defaultStatus" TARGET="_top">Hewlett Packard</NOBR></A>. CodeAdvisor is a
part of <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=hp" ONMOUSEOVER = "self.status = 'Hewlett Packard Home Page'; return true" ONMOUSEOUT = "self.status = self.defaultStatus" TARGET="_top">HP</NOBR></A>'s <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=softbench" ONMOUSEOVER = "self.status = 'SoftBench Home Page'; return true" ONMOUSEOUT = "self.status = self.defaultStatus" TARGET="_top">
SoftBench</A></NOBR> development environment. It comes able to enforce 23
predefined rules, but users may extend its capabilities by
coding new analyses in C++ and linking them in. Source code
information is stored in a database, so it is possible to perform
checks that involve multiple translation units.<SCRIPT>create_link(17);</SCRIPT>
<A NAME="AUTO00013"></A>
<A NAME="dingp18"></A><LI><A NAME="wiz"></A><NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=codewizard" ONMOUSEOVER = "self.status = 'CodeWizard Home Page'; return true" ONMOUSEOUT = "self.status = self.defaultStatus">CodeWizard</NOBR></A>
from <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=parasoft" ONMOUSEOVER = "self.status = 'ParaSoft Home Page'; return true" ONMOUSEOUT = "self.status = self.defaultStatus" TARGET="_top">ParaSoft</NOBR></A>. CodeWizard is
a standalone product
designed to enforce a set of 24 rules selected from <A HREF="../EC/INDEX.HTM" TARGET="_top" ONMOUSEOVER="self.status='Effective C++'; return true" ONMOUSEOUT = "self.status = self.defaultStatus"><I>Effective C++</I></A>.<SCRIPT>create_link(18);</SCRIPT>
<A NAME="AUTO00014"></A>
<A NAME="dingp19"></A><LI><A NAME="qa"></A><NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=qacc" ONMOUSEOVER = "self.status = 'QA/C++ Home Page'; return true" ONMOUSEOUT = "self.status = self.defaultStatus" TARGET="_top">QA/C++</NOBR></A> from
<NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=prqa" ONMOUSEOVER = "self.status = 'Programming Research Ltd. Home Page'; return true" ONMOUSEOUT = "self.status = self.defaultStatus" TARGET="_top">Programming</NOBR> Research Ltd.</A>.
Another standalone product,
<NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=qacc" ONMOUSEOVER = "self.status = 'QA/C++ Home Page'; return true" ONMOUSEOUT = "self.status = self.defaultStatus" TARGET="_top">QA/C++</NOBR></A> works in two phases. First, it examines C or C++ source code
and stores the results in a database. Different Programming
Research analysis tools may then be run against the database, and it
is these tools that generate warning messages. There is no database
API that lets programmers develop their own analyses.<SCRIPT>create_link(19);</SCRIPT>
<A NAME="AUTO00015"></A>
<A NAME="dingp20"></A><LI><A NAME="apex"></A>The <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=apexcpp" ONMOUSEOVER = "self.status = 'Apex C/C++ Home Page'; return true" ONMOUSEOUT = "self.status = self.defaultStatus" TARGET="_top">Apex</NOBR> C/C++ Development Environment</A>
from <NOBR><FONT COLOR="#FF0000" SIZE="-2"><B>°</B></FONT><A HREF="http://www.awl.com/cseng/cgi-bin/cdquery.pl?name=rational" ONMOUSEOVER = "self.status = 'Rational Software Home Page'; return true" ONMOUSEOUT = "self.status = self.defaultStatus" TARGET="_top">Rational</NOBR> Software</A>. The
Apex environment includes, among other capabilities, the ability to
enforce 22 predefined rules for C and C++ programming.<SCRIPT>create_link(20);</SCRIPT>
</UL>
<P><A NAME="dingp21"></A><A NAME="AUTO00016"></A>To these choices we added our own noncommercial program, CCEL (<A
HREF="#references" ONMOUSEOVER = "self.status = 'References'; return true" ONMOUSEOUT = "self.status = self.defaultStatus">References</A>), purely for purposes of comparison.
CCEL began as a research project on static analysis of C++ programs
under the direction of one of us (Meyers) and was eventually implemented through independent work by the other (Klaus). We added
CCEL to our investigation because we were familiar with its capabilities
and limitations, and we felt it would be interesting to compare
commercial approaches to our research-based initiative. (Regrettably, the CCEL implementation cannot be made available, not even for research purposes. To find everything about CCEL that <i>is</i> available, consult the <a href="#references">references</a> <NOBR>below.)<SCRIPT>create_link(21);</SCRIPT>
</NOBR></P>
<P><A NAME="dingp22"></A><FONT ID="aititle">Approach</FONT><SCRIPT>create_link(22);</SCRIPT>
</P>
<P><A NAME="dingp23"></A>Our testing of the tools was broken into three <NOBR>phases:<SCRIPT>create_link(23);</SCRIPT>
</NOBR></P>
<OL>
<A NAME="dingp24"></A><LI>We developed of a set of benchmark rules constraining the structure
of C++ programs. For example, one rule is that all base classes must
have virtual destructors. We tried to develop a set of rules that was
representative of the kinds of rules real programmers would find useful.<SCRIPT>create_link(24);</SCRIPT>
<A NAME="AUTO00017"></A>
<A NAME="dingp25"></A><LI>We contacted the vendor for each tool and asked them which rules
their product could enforce. This information proved useful
during our later empirical tests, because discrepancies between
vendor claims and our empirical findings often identified subtle
differences between our rules and those enforced by the
vendors.<SCRIPT>create_link(25);</SCRIPT>
<A NAME="AUTO00018"></A>
<A NAME="dingp26"></A><LI>We developed of a set of sample source files seeded with rule
violations. We ran each tool on each source file to see whether
the seeded rule violation was correctly identified.<SCRIPT>create_link(26);</SCRIPT>
</OL>
<P><A NAME="dingp27"></A>Our results yielded a <A HREF="TOOLS.HTM#table3" ONMOUSEOVER = "self.status = 'table'; return true" ONMOUSEOUT = "self.status = self.defaultStatus">table</A> showing how well
each tool enforced our benchmark rules on our benchmark <NOBR>programs.<SCRIPT>create_link(27);</SCRIPT>
</NOBR></P>
<P><A NAME="dingp28"></A><FONT ID="aititle">Choosing Rules</FONT><SCRIPT>create_link(28);</SCRIPT>
</P>
<P><A NAME="dingp29"></A><A NAME="AUTO00019"></A> One can imagine many ways to compose a set of benchmark rules for C++
programs, but it is difficult to argue that one set is "better" than
another. As a result, we made no attempt to develop the "best" set of
rules. Instead, we fell back on the fact that one of us (Meyers) has
authored two books containing guidelines for C++ programming (<A HREF="../EC/INDEX.HTM" TARGET="_top" ONMOUSEOVER="self.status='Effective C++'; return true" ONMOUSEOUT = "self.status = self.defaultStatus"><I>Effective
C++</I></A> and <A HREF="../MEC/INDEX.HTM" TARGET="_top" ONMOUSEOVER="self.status='More Effective C++'; return true" ONMOUSEOUT = "self.status = self.defaultStatus"><I>More Effective C++</I></A>), and we chose nearly all our
rules from those <NOBR>books.<SCRIPT>create_link(29);</SCRIPT>
</NOBR></P>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -