Module Apron.Texpr1

module Texpr1: sig .. end

type t = {
   mutable texpr0 :Apron.Texpr0.t;
   mutable env :Apron.Environment.t;
}
type unop = Apron.Texpr0.unop = 
| Neg
| Cast
| Sqrt
Unary operators
type binop = Apron.Texpr0.binop = 
| Add
| Sub
| Mul
| Div
| Mod
| Pow
Binary operators
type typ = Apron.Texpr0.typ = 
| Real
| Int
| Single
| Double
| Extended
| Quad
Destination type for rounding
type round = Apron.Texpr0.round = 
| Near
| Zero
| Up
| Down
| Rnd
Rounding direction
type expr = 
| Cst of Apron.Coeff.t
| Var of Apron.Var.t
| Unop of unop * expr * typ * round
| Binop of binop * expr * expr * typ
* round
User type for tree expressions

Constructors and Destructor


val of_expr : Apron.Environment.t -> expr -> t
General constructor (actually the most efficient)
val copy : t -> t
Copy
val of_linexpr : Apron.Linexpr1.t -> t
Conversion
val to_expr : t -> expr
General destructor

Incremental constructors


val cst : Apron.Environment.t -> Apron.Coeff.t -> t
val var : Apron.Environment.t -> Apron.Var.t -> t
val unop : Apron.Texpr0.unop ->
t -> Apron.Texpr0.typ -> Apron.Texpr0.round -> t
val binop : Apron.Texpr0.binop ->
t ->
t -> Apron.Texpr0.typ -> Apron.Texpr0.round -> t

Tests


val is_interval_cst : t -> bool
val is_interval_linear : t -> bool
val is_interval_polynomial : t -> bool
val is_interval_polyfrac : t -> bool
val is_scalar : t -> bool

Operations


val extend_environment : t -> Apron.Environment.t -> t
Change the environment of the expression for a super-environement. Raise Failure if it is not the case
val extend_environment_with : t -> Apron.Environment.t -> unit
Side-effet version of the previous function
val get_texpr0 : t -> Apron.Texpr0.t
Get the underlying expression of level 0 (which is not a copy).
val get_env : t -> Apron.Environment.t
Get the environement of the expression

Printing


val string_of_unop : unop -> string
val string_of_binop : binop -> string
val string_of_typ : typ -> string
val string_of_round : round -> string
val print_unop : Format.formatter -> unop -> unit
val print_binop : Format.formatter -> binop -> unit
val print_typ : Format.formatter -> typ -> unit
val print_round : Format.formatter -> round -> unit
val print_expr : Format.formatter -> expr -> unit
Print a tree expression
val print : Format.formatter -> t -> unit
Print an abstract tree expression