[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |

We manipulate here expressions of the form

where the coefficientsa_0.x_0 + ... + a_n.x_n + b

`ap_coeff_t`

type (either scalars or intervals) and the variables
`ap_var_t`

.
The semantics of linear expressions is exact, in the sense that the
arithmetic operations are interpreted in the real (or rational)
numbers. However, abstract domains are free to overapproximate this
exact semantics (this may occur when converting rational scalars to
`double`

type for instance).

A special remark concerns integer variables. Abstract domains are assumed to perform the operations involving linear expressions using a real/rational semantics, and then possibly to reduce the result using the knowledge that integer variables may only take integer values.

This semanticscoincideswith the natural integer semantics of expressions involving only integer variablesonly ifthe involved coefficients are all integers.

A typical counter-example to this is an assignementy := 1/3 xwherexandyare integer variables. If this assignement is applied to the BOX abstract domain valuex in [1;1], it may lead to the bottom value, because one will first obtainy in [1/3;1/3]by real/rational computations, and this may be reduced to the empty interval becauseyis integer and the interval contains no integer values.

If you need expressions with a less simple semantics (mixing integer,
real/rational and floating-point semantics with casts), you should use
tree expressions (see section Tree expressions of level 1 (``ap_texpr1.h'`)).

__datatype:__**ap_linexpr1_t**- (Internal) type of interval linear expressions.
Linear expressions of level 1 are created as objects of type

`ap_linexpr1_t`

, not as pointers of type`ap_linexpr1_t*`

.For information:

typedef struct ap_linexpr1_t { ap_linexpr0_t* linexpr0; ap_environment_t* env; } ap_linexpr1_t;

Allocating linear expressions of level 1 Tests on linear expressions of level 1 Access to linear expressions of level 1 Change of dimensions and permutations of linear expressions of level 1

[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |

This document was generated on