package apronext
Module Apronext.EnvironmentextSource
This file is an extension for the Environment from the apron Library
Note : It only adds function, nothing is removed. Extensions are at the end of the module
val make : Apron.Var.t array -> Apron.Var.t array -> tMaking an environment from a set of integer and real variables. Raise Failure in case of name conflict.
Adding to an environment a set of integer and real variables. Raise Failure in case of name conflict.
Remove from an environment a set of variables. Raise Failure in case of non-existing variables.
Renaming in an environment a set of variables. Raise Failure in case of interferences with the variables that are not renamed.
Similar to previous function, but returns also the permutation on dimensions induced by the renaming.
Compute the least common environment of 2 environment, that is, the environment composed of all the variables of the 2 environments. Raise Failure if the same variable has different types in the 2 environment.
Similar to the previous function, but returns also the transformations required to convert from e1 (resp. e2) to the lce. If None is returned, this means that e1 (resp. e2) is identic to the lce.
dimchange e1 e2 computes the transformation for converting from an environment e1 to a superenvironment e2. Raises Failure if e2 is not a superenvironment.
dimchange2 e1 e2 computes the transformation for converting from an environment e1 to a (compatible) environment e2, by first adding (some) variables of e2 and then removing (some) variables of e1. Raises Failure if the two environments are incompatible.
Compare two environment. compare env1 env2 return -2 if the environements are not compatible (a variable has different types in the 2 environements), -1 if env1 is a subset of env2, 0 if equality, +1 if env1 is a superset of env2, and +2 otherwise (the lce exists and is a strict superset of both)
val hash : t -> intHashing function for environments
val dimension : t -> Apron.Dim.dimensionReturn the dimension of the environment
val size : t -> intReturn the size of the environment
val mem_var : t -> Apron.Var.t -> boolReturn true if the variable is present in the environment.
Return the type of variables in the environment. If the variable does not belong to the environment, raise a Failure exception.
val vars : t -> Apron.Var.t array * Apron.Var.t arrayReturn the (lexicographically ordered) sets of integer and real variables in the environment
val var_of_dim : t -> Apron.Dim.t -> Apron.Var.tReturn the variable corresponding to the given dimension in the environment. Raise Failure is the dimension is out of the range of the environment (greater than or equal to dim env)
val dim_of_var : t -> Apron.Var.t -> Apron.Dim.tReturn the dimension associated to the given variable in the environment. Raise Failure if the variable does not belong to the environment.
val print :
?first:(unit, Format.formatter, unit) format ->
?sep:(unit, Format.formatter, unit) format ->
?last:(unit, Format.formatter, unit) format ->
Format.formatter ->
t ->
unitPrinting
Extensions
Exception to raise when adding a variable that alread exists in the environment
same as add but first check if the variables exist in the environement and raises DuplicateName is it is the case.
adds one variable to an environment according to its type