package apronext
Module Apronext.GeneratorextSource
This file is an extension for the Generator1 module from the apron Library
Note : It only adds function, nothing is removed. Extensions are at the end of the documentation
val make : Apron.Linexpr1.t -> Apron.Generator0.typ -> tMake a generator. Modifying later the linear expression (not advisable) modifies correspondingly the generator and conversely, except for changes of environements
val print : Format.formatter -> t -> unitPrint the generator
val get_typ : t -> Apron.Generator0.typGet the generator type
val iter : (Apron.Coeff.t -> Apron.Var.t -> unit) -> t -> unitIter the function on the pair coefficient/variable of the underlying linear expression
val set_typ : t -> Apron.Generator0.typ -> unitSet the generator type
val set_list : t -> (Apron.Coeff.t * Apron.Var.t) list -> unitSet simultaneously a number of coefficients.
set_list expr [(c1,"x"); (c2,"y")] assigns coefficients c1 to variable "x" and coefficient c2 to variable "y".
val set_array : t -> (Apron.Coeff.t * Apron.Var.t) array -> unitSet simultaneously a number of coefficients, as set_list.
val get_coeff : t -> Apron.Var.t -> Apron.Coeff.tGet the coefficient of the variable in the underlying linear expression
val set_coeff : t -> Apron.Var.t -> Apron.Coeff.t -> unitSet the coefficient of the variable in the underlying linear expression
Change the environement of the generator for a super-environement. Raise Failure if it is not the case
val extend_environment_with : t -> Apron.Environment.t -> unitSide-effect version of the previous function
Type earray
Make an array of generators with the given size and defined on the given environement. The elements are initialized with the line 0.
val array_print :
?first:(unit, Format.formatter, unit) format ->
?sep:(unit, Format.formatter, unit) format ->
?last:(unit, Format.formatter, unit) format ->
Format.formatter ->
Apron.Generator1.earray ->
unitPrint an array of generators
val array_get : Apron.Generator1.earray -> int -> tGet the element of the given index (which is not a copy)
val array_set : Apron.Generator1.earray -> int -> t -> unitSet the element of the given index (without any copy). The array and the generator should be defined on the same environement; otherwise a Failure exception is raised.
val array_extend_environment :
Apron.Generator1.earray ->
Apron.Environment.t ->
Apron.Generator1.earrayChange the environement of the array of generators for a super-environement. Raise Failure if it is not the case
Side-effect version of the previous function
val get_env : t -> Apron.Environment.tGet the environement of the generator
val get_linexpr1 : t -> Apron.Linexpr1.tGet the underlying linear expression. Modifying the linear expression (not advisable) modifies correspondingly the generator and conversely, except for changes of environements
val get_generator0 : t -> Apron.Generator0.tGet the underlying generator of level 0. Modifying the generator of level 0 (not advisable) modifies correspondingly the generator and conversely, except for changes of environements
Extensions
Converts a Generator1 into a float array array.
returns a generator corresponding to a float point
Higher-order functions utilities
fold function over generator.earay
iter function over generator.earay
forall function over generator.earay
exists function over generator.earay