Frama-C API - S
type widen_hint = Datatype.Float.Set.t
Hints for the widening: set of relevant thresholds.
val packed_descr : Structural_descr.pack
val pretty : Stdlib.Format.formatter -> t -> unit
val hash : t -> int
Returns the bounds of the float interval, (or None if the argument is exactly NaN), and a boolean indicating the possibility that the value may be NaN.
val nan : t
The NaN singleton
inject ~nan b e
creates the floating-point interval b..e
, plus NaN if nan
is true. b
and e
must be ordered, and not NaN. They can be infinite.
Lattice operators.
val widen : ?hint:widen_hint -> prec -> t -> t -> t
val narrow : t -> t -> t Lattice_bounds.or_bottom
val contains_a_zero : t -> bool
val contains_pos_zero : t -> bool
val contains_neg_zero : t -> bool
val contains_non_zero : t -> bool
val contains_pos_infinity : t -> bool
val contains_neg_infinity : t -> bool
val contains_nan : t -> bool
val is_singleton : t -> bool
Returns true
on NaN.
val is_negative : t -> Abstract_interp.Comp.result
is_negative f
returns True
iff all values in f
are negative; False
iff all values are positive; and Unknown
otherwise. Note that we do not keep sign information for NaN, so if f
may contain NaN, the result is always Unknown
.
val is_finite : t -> Abstract_interp.Comp.result
val is_infinite : t -> Abstract_interp.Comp.result
val is_not_nan : t -> Abstract_interp.Comp.result
val backward_is_finite : positive:bool -> prec -> t -> t Lattice_bounds.or_bottom
val backward_is_infinite : positive:bool -> prec -> t -> t Lattice_bounds.or_bottom
val backward_is_nan : positive:bool -> t -> t Lattice_bounds.or_bottom
has_greater_min_bound f1 f2
returns 1 if the interval f1
has a better minimum bound (i.e. greater) than the interval f2
.
has_smaller_max_bound f1 f2
returns 1 if the interval f1
has a better maximum bound (i.e. lower) than the interval f2
.
val forward_comp : Abstract_interp.Comp.t -> t -> t -> Abstract_interp.Comp.result
val backward_comp_left_true : Abstract_interp.Comp.t -> prec -> t -> t -> t Lattice_bounds.or_bottom
backward_comp_left_true op prec f1 f2
attempts to reduce f1
into f1'
so that the relation f1' op f2
holds. prec
is the precision of f1
and f1'
, but not necessarily of f2
.
val backward_comp_left_false : Abstract_interp.Comp.t -> prec -> t -> t -> t Lattice_bounds.or_bottom
backward_comp_left_false op prec f1 f2
attempts to reduce f1
into f1'
so that the relation f1' op f2
doesn't holds. prec
is the precision of f1
and f1'
, but not necessarily of f2
.
val backward_cast : src:prec -> t -> t Lattice_bounds.or_bottom
Bitwise reinterpretation of a floating-point interval of double precision into consecutive ranges of integers.
Bitwise reinterpretation of a floating-point interval of single precision into consecutive ranges of integers.
Subdivides an interval of a given precision into two intervals. Raises Abstract_interp.Can_not_subdiv
if it can't be subdivided. prec
must be Single
or Double
.