Static program analysis

Introduction

Some programs need to be analyzed in the program is running, this program is called dynamic analysis program analysis. Most of the objects are static program analysis of the source code for a specific version of the objects are also some static program analysis is object code. The term is mostly static program analysis refers to analysis tools with the static program analysis manually is generally referred to as program understanding (English: programcomprehension) or code review.

complexity of static program analysis tools used according to differ, simply consider only the behavior of individual narrative and declarations, complex analysis can complete source code of the program. Different static program analysis information generated is also different, simply mark may be possible code errors (such as lint programming tools (English: lintprogrammingtool)) of a complex can be formal methods, that is a mathematically proven program these actions are consistent with its design specifications.

software metrics and reverse engineering can be seen as a way of static program analysis. In practice, in the so-called software defined quality pointer (softwarequalityobjectives), derived metrics software program analysis and is usually carried out together, often carried out in this way in the development of embedded systems.

use

static program analysis can be used to validate the commercial use of safety-critical computer systems software, computer codes and pointed out that there may be security risks, more and more such applications many. For example, the following industries have been identified as a way to improve analysis of complex software quality with a static program:

Static program analysis

Medical software: the United States by the US Food and Drug Administration to determine the use of static program analysis on medical equipment.

Nuclear Software: UK Health and Safety Commission (English: HealthandSafetyExecutive) recommendations for reactor protection system: software (English ReactorProtectiveSystem) of static program analysis.

in the information security field, static program analysis application will be referred to as static security testing (StaticApplicationSecurityTesting, abbreviated SAST).

Formal Methods

formal method is a purely mathematical way to use analysis software, the application of mathematical techniques to include allegations of semantics, axiomatic semantics, operational semantics and abstract Interpretation other methods in computer science.

For any Turing-complete programming language, an algorithm can not exist any program can find all errors during operation, there is no mathematical way to get errors during a program run if there will be results . The above conclusion is the result of research income halting problem in the 1930s by the Kurt Gödel, Alonzo Church and Alan Turing. As with many issues, but can not determine a Yang, still managed to find approximate solutions useful in practice.

The following are some of the formal implementation of static analysis:

  • is a simplified finite state model checking system for use with a finite state or can be abstracted.

  • stream analysis procedures may be collected to the calculated values ​​at different points.

  • abstract interpretation can be regarded as part of the implementation of the computer program to obtain semantic information about it (such as, control structures, the flow of information) without performing all calculations. Frama-c and Polyspace other tools mainly based on abstract interpretation.

  • tags added assertions, the method first used by a Hall logic. Some programming languages ​​support a corresponding tool, for example, SPARK (a subset of the Ada programming language), Java language modeling (using ESC / Java and ESC / Java2) and Frama-cWP plug for the C language (weakest initial condition) this extends to the mating plug need ACSL (ANSI / ISO C Specification language) of the C language.

Related Articles
TOP