ITPub博客

首页 > Linux操作系统 > Linux操作系统 > What Is a Static Analysis Tool?

What Is a Static Analysis Tool?

原创 Linux操作系统 作者:AlexQin 时间:2010-09-27 14:19:21 0 删除 编辑
A static analysis tool (or static analyzer) has three major characteristics:

· Its input is the source code for a program in a programming language.
· It analyzes the program’s structure without executing the program.
· As its primary function, the tool outputs information that is relevant to humans developing or maintaining the program.

This general definition includes tools such as coding standard checkers, bug finders, and test case generators.

Many static analysis tools attempt to detect problematic constructs. Ideally, such a tool should identify all constructs in a given program—and only those constructs encountering the problem during execution. Unfortunately, mathematical computability theory shows that it is impossible to produce such a tool for analyzing arbitrary programs in any nontrivial programming language. So, in practice, a tool will suffer from either one or both of these deficiencies:

· Failure to detect a problem, yielding what is (perhaps confusingly) known as a false negative.
· Mistakenly flagging a correct construct as a problem, yielding a false alarm (known in the literature as a false positive).

A tool that does not generate false negatives is said to be sound. A tool’s precision is a measure of its ability to avoid generating false positives. Soundness and precision are tradeoffs, so the challenge for a tool provider is to strike an appropriate balance.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/11379785/viewspace-675902/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-07-24

  • 博文量
    258
  • 访问量
    1049549