Previous: Tree constraints of level 1, Up: Level 1 of the interface
Datatype for abstract values at level 1.
For information:
typedef struct ap_abstract1_t { ap_abstract0_t* abstract0; ap_environment_t* env; } ap_abstract1_t; /* data structure invariant: ap_abstract0_integer_dimension(man,abstract0)== env->intdim && ap_abstract0_real_dimension(man,abstract0)== env->realdim */
typedef struct ap_box1_t { ap_interval_t** p; ap_environment_t* env; } ap_box1_t; void ap_box1_fprint(FILE* stream, ap_box1_t* box); void ap_box1_clear(ap_box1_t* box);
Most operations are offered in 2 versions: functional or destructive See Abstract values and operations of level 0.
We remind the policy for redimensioning (see Level 1 of the interface):
Next: Control of internal representation of abstract values of level 1, Previous: Abstract values and operations of level 1, Up: Abstract values and operations of level 1
Return a copy of a, on which destructive update does not affect a.
Free all the memory used by a.
Return the abstract size of a.
Next: Printing abstract values of level 1, Previous: Allocating abstract values of level 1, Up: Abstract values and operations of level 1
Minimize the size of the representation of a. This may result in a later recomputation of internal information.
Put a in canonical form. (not yet clear definition).
Return an hash value for a. Two abstract values in canonical
from (according to ap_abstract1_canonicalize
) and considered as
equal by the function ap_abstract1_is_eq
are given the
same hash value.
Perform some transformation on a, guided by the field algorithm.
The transformation may lose information. The argument
algorithm overrides the field algorithm of the structure of
type ap_funopt_t
associated to
ap_abstract1_approximate
.
Next: Serialization of abstract values of level 1, Previous: Control of internal representation of abstract values of level 1, Up: Abstract values and operations of level 1
Print a in a pretty way on the stream.
Print the difference between a1 (old value) and a2 (new value). The meaning of difference is library dependent.
Dump the internal representation of a for debugging purposes.
Next: Constructors for abstract values of level 1, Previous: Printing abstract values of level 1, Up: Abstract values and operations of level 1
Allocate a memory buffer (with malloc
), output a
in raw binary format to it and return a pointer on the memory
buffer and the number of bytes written. It is the user
responsability to free the memory afterwards (with free
).
Return the abstract value read in raw binary format from the buffer pointed by ptr and store in size the number of bytes read.
Next: Accessors for abstract values of level 1, Previous: Serialization of abstract values of level 1, Up: Abstract values and operations of level 1
Create resp. a bottom (empty) value and a top (universe) value defined on the environment env.
Abstract an hypercube defined by the arrays tvar and tintnerval of size size.
If no inclusion is specified for a variable in the environment, its value is no constrained in the resulting abstract value.
Next: Tests on abstract values of level 1, Previous: Constructors for abstract values of level 1, Up: Abstract values and operations of level 1
Get a reference to the environment of a. Do not free it.
Get a reference to the manager contained in a. Do not free it.
Get a reference to the underlying abstract value of level 0 in a. Do not free it.
Next: Extraction of properties of abstract values of level 1, Previous: Accessors for abstract values of level 1, Up: Abstract values and operations of level 1
In abstract tests,
Emtpiness and universality tests.
Inclusion and equality tests.
Is the variable var included in the interval interval in the abstract value a ?
Does the abstract value a satisfy the constraint cons ?
Is the dimension dim unconstrained in the abstract value a ?
If it is the case, we have forget(man,a,dim) == a
.
Next: Meet and Join of abstract values of level 1, Previous: Tests on abstract values of level 1, Up: Abstract values and operations of level 1
Return the interval taken by the variable var over the abstract value a.
Return the interval taken by the expression expr over the abstract value a.
In the case of truly linear expression, this function allows to solve a Linear Programming (LP) problem, but depending on the underlying domain the solution may be not optimal.
Convert a to an interval/hypercube.
Convert a to a conjunction of linear (resp. tree) constraints.
The constraints are normally guaranteed to be without intervals.
Convert a to an array of generators.
Next: Assignements and Substitutions of abstract values of level 1, Previous: Extraction of properties of abstract values of level 1, Up: Abstract values and operations of level 1
Meet and Join of 2 abstract values
Meet and Join of the array array of abstract values of size size.
Raise an AP_EXC_INVALID_ARGUMENT
exception if
size==1
(no way to define the environment of the result
in such a case).
Meet of the abstract value a with the set of constraints array.
Generalized time elapse operator.
array is supposed to contain only rays or lines, no vertices.
Next: Existential quantification of abstract values of level 1, Previous: Meet and Join of abstract values of level 1, Up: Abstract values and operations of level 1
Parallel Assignement and Substitution of several variables by expressions in abstract value org.
dest is an optional argument. If not NULL, semantically speaking, the result of the transformation is intersected with dest. This is useful for precise backward transformations in lattices like intervals or octagons.
Next: Change of environments of abstract values of level 1, Previous: Assignements and Substitutions of abstract values of level 1, Up: Abstract values and operations of level 1
Forget (project=false
) or Project (project=true
) the
array of variables tvar of size size in the abstract
value a.
Next: Expansion and Folding of dimensions in abstract values of level 1, Previous: Existential quantification of abstract values of level 1, Up: Abstract values and operations of level 1
Change the environment of the abstract values. Variables that are
removed are first existentially quantified, and variables that are
introduced are either unconstrained (project==false
) or
initialized to 0 (project==false
).
Remove from the environment of the abstract value and from the abstract value itself variables that are unconstrained in it.
Parallel renaming of the environment of the abstract value. The new variables should not interfere with the variables that are not renamed.
Next: Widening of abstract values of level 1, Previous: Change of environments of abstract values of level 1, Up: Abstract values and operations of level 1
Formally, expanding z
into z
and w
in
abstract value (predicate) P
is defined by
expand(P(x,y,z),z,w) = P(x,y,z) and P(x,y,w).
Conversely, folding z
and w
into z
in
abstract value (predicate) Q
is defined by
fold(Q(x,y,z,w),z,w) = (exists w: Q(x,y,z,w)) or (exists z:Q(x,y,z,w)[z<-w]).
Expand the variable var into itself + the size additional variables of the array tvar, which are given the same type as var. The additional variables are added to the environment of the argument for making the environment of the result, so they should not belong to the initial environment.
It results in size+1
unrelated variables having same relations
with other dimensions.
Fold the variables in the array tvar of size size>=1 and put the result in the first variable in the array. The other variables of the array are then forgot and removed from the environment.
Next: Topological closure of abstract values of level 1, Previous: Expansion and Folding of dimensions in abstract values of level 1, Up: Abstract values and operations of level 1
Widening of a1 with a2. a1 is supposed to be included in a2.
Widening with threshold.
Intersect the result of the standard widening with all the constraints in array that are satisfied by both a1 and a2.
Next: Additional functions on abstract values of level 1, Previous: Widening of abstract values of level 1, Up: Abstract values and operations of level 1
Relax strict constraints into non strict constraints.
Previous: Topological closure of abstract values of level 1, Up: Abstract values and operations of level 1
Abstract a conjunction of constraints. The environment of the array should be a subset of the environment env.
Assignement and Substitution of the dimension dim by the expression expr in abstract value org.
dest is an optional argument. If not NULL, semantically speaking, the result of the transformation is intersected with dest. This is useful for precise backward transformations in lattices like intervals or octagons.
Unify two abstract values on their common variables, that is, embed them on the least common environment and then compute their meet. The result is defined on the least common environment.
For instance, the unification of 1<=x<=3 and x=y
defined on
{ x, y }
and 2<=z<=4 and z=y
defined on
{y,z }
results in 2<=x<=3 and x=y=z
defined on
{x,y,z}
.
Evaluate the interval linear expression expr on the abstract value a and approximate it by a quasilinear expression.
This implies calls to ap_abstract0_bound_dimension
.
Evaluate the tree expression expr on the abstract value a and approximate it by an interval linear (resp. quasilinear if quasilinear is true) expression.
This implies calls to ap_abstract0_bound_dimension
.