Science  People  Locations  Timeline
Index: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Home > Abstract interpretation


 

Abstract interpretation is a theory of sound approximation of the semantics of computer programs, based on monotonic functions over ordered sets, especially lattices. It can be viewed as a partial execution of a computer program which gains information about its semantics (e.g. control structure, flow of information ) without performing all the calculations.

Its main concrete application is formal static analysis, the automatic extraction of information about the possible executions of computer programs; such analyses have two main usages:

Abstract interpretation was formalized by Pr Patrick Cousot .

1 Intuition

We shall now illustrate what abstract interpretation would mean on concrete, not computing examples.

Let us consider the people in a conference room. If we wish to prove that some persons were not present, one concrete method is to look up a list the names and social security numbers of all participants.

We may however have restricted ourselves to registering only their names. If the name of a person is not found in the list, we may safely conclude that that person was not present; but if it is, we cannot conclude definitely without further enquiries, due to the possibility of homonyms. Let us note that this imprecise information will still be adequate for most purposes, because homonyms are rare in practice.

If we are only interested in some specific information, say, "was there a person of age n in the room", keeping a list of all names and dates of births is unnecessary. We may safely and without loss of precision restrict ourselves to keeping a list of the participants' ages. If this is already too much to handle, we might keep only the minimal m and maximal M ages. If the question is about an age strictly lower than m or stricty higher than M, then we may safely respond that no such participant was present. Otherwise, we may only be able to say that we do not know.

In the case of computing, concrete, precise information is in general not computable within finite time and memory (see Rice's theorem and the halting problemIn computability theory the halting problem is a decision problem which can be informally stated as follows: : Given a description of an algorithm and its initial input, determine whether the algorithm, when executed on this input, ever halts (completes).). AbstractionThis article is about the concept of abstraction in general. For other uses, please see abstract (disambiguation). Abstraction is the thought process wherein ideas are distanced from objects. Abstraction uses a strategy of simplification of detail, wherei is used to simplify problems up to problems amenable to automatic solutions. One crucial issue is to diminish precision so as to make problems manageable while still keeping enough precision for answering the questions (such as "may the program crash?") one is interested in.

2 Abstract interpretation of computer programs

Given a programming or specification language, abstract interpretation consists in giving several semantics linked by relations of abstraction. The most precise semantics, describing very closely the actual execution of the program, is called the concrete semantics. For instance, the concrete semantics of an imperative programming language may associate to each program the set of execution traces it may produce – an execution trace being a sequence of possible consecutive states of the execution of the program; a state typically consists of the value of the program counter and the memory locations (globals, stack and heap). More abstract semantics are then derived; for instance, one may consider only the set of reachable states in the executions (which amounts to considering the last states in finite traces).

For goals of static analysis, some computable abstract semantics must be derived at some point. For instance, one may choose to represent the state of a program manipulating integer variables by forgetting the actual values of the variables and only keeping their signs (+, - or 0). For some elementary operations, such as multiplicationArithmetic In its simplest form, multiplication is a quick way of adding identical numbers. The result of multiplying numbers is called a product''. The numbers being multiplied are called coefficients or factors and individually as the multiplicand and m, such an abstraction does not lose any precision: to get the sign of a product, it is sufficient to know the sign of the operands. For some other operations, the abstraction may lose precision: for instance, it is impossible to know the sign of a sum whose operands are respectively positive and negative.

Such loss of precision may not, in general, be avoided so as to make a decidable semantics (see Rice's theorem, halting problemIn computability theory the halting problem is a decision problem which can be informally stated as follows: : Given a description of an algorithm and its initial input, determine whether the algorithm, when executed on this input, ever halts (completes).). There is, in general, a compromise to be made between the precision of the analysis and its tractability, either from a computability point of view or from a complexityThere are different senses of complexity In information processing, complexity is a measure of the total number of properties transmitted by an object and detected by an observer. Such a collection of properties is often referred to as a state. In physica point of view.



Read more »

Non User