Next: Abstract values and operations of level 1, Previous: Tree expressions of level 1, Up: Level 1 of the interface
Tree constraints are constraints built on tree expressions.
• Datatypes for tree constraints of level 1 | ||
• Constructors/Destructors for tree constraints of level 1 | ||
• Operations on tree constraints of level 1 | ||
• Arrays of tree constraints of level 1 |
Next: Constructors/Destructors for tree constraints of level 1, Previous: Tree constraints of level 1, Up: Tree constraints of level 1
Datatype for constraints.
For information:
typedef struct ap_tcons1_t { ap_tcons0_t tcons0; ap_environment_t* env; } ap_tcons1_t;
typedef struct ap_tcons1_array_t { ap_tcons0_array_t tcons0_array; ap_environment_t* env; } ap_tcons1_array_t;
Datatype for arrays of constraints.
Arrays at level 1 cannot be accessed directly, for example by writing
array->p[i]
, but should instead be accessed with functions
ap_tcons1_array_get
and ap_tcons1_array_set
.
Next: Operations on tree constraints of level 1, Previous: Datatypes for tree constraints of level 1, Up: Tree constraints of level 1
Create a constraint of given type with the given expression. The expression and the optional coefficient are not duplicated, just pointed to.
Create a tree constraint from a linear constraint.
Duplication.
Clear the constraint and set pointers to NULL.
Printing
Get a reference to the environment. Do not free it.
Get a reference to the type of constraint.
Get a reference to the auxiliary coefficient of the constraint.
Get a reference to the underlying expression of the constraint. Do not free it: nothing is duplicated. Modifying the argument or the result is equivalent, except for change of dimensions/environment.
Return underlying constraint of level 0. Do not free it: nothing is duplicated. Modifying the argument or the result is equivalent, except for change of dimensions/envionment.
Next: Arrays of tree constraints of level 1, Previous: Constructors/Destructors for tree constraints of level 1, Up: Tree constraints of level 1
Change current environment with a super-environment. Return
true
if nenv is not a superenvironment of e->env
.
Allocate an array of size constraints. The constraints are
initialized with NULL pointers, so that ap_tcons1_array_free
may be safely called.
Clear the constraints of the array, and then the array itself.
Printing.
Return the size of the array.
Return a reference to the environment of the array. Do not free it.
Clear the constraint at index index and set pointers to NULL
.
Return the linear constraint of the given index Nothing is duplicated, and the result should never be cleared. Modifying the argument or the result is equivalent, except for change of environments.
Fill the index of the array with the constraint. Assumes
ap_environment_is_eq(array->env,cons->env)
. Nothing is
duplicated. The argument should never be cleared (its environment
is dereferenced). If a constraint was already stored, it is first
cleared. Return true
iff problem (index or array->env!=cons->env
)
Change current environment with a super-environment. Return
true
if nenv is not a superenvironment of
array->env
.