Abstract_domains.Interval
Copyright © Inria 2023-2024
Abstract domain of intervals over integers (for testing purposes only). Integer over- and under-flows are not supported.
include Sigs.ABSTRACT_DOMAIN
val bot : t
The bottom element \bot
(most precise element)
val is_bot : t -> bool
Tests whether an element is \bot
val top : t
The top element \top
(less precise element)
Inclusion test between abstract values. Smaller elements are more precise; larger elements are less precise. This might not be a total order, and might not be anti-symmetric either.
Abstract union of abstract values. This need not be the least upper bound for leq
, nor an upper bound at all.
Widening operator, i.e., an approximation of the concrete union, that is used the ensure the convergence of Kleene-based iterations.
Abstract intersection of abstract values. This need not be the greatest lower bound for leq
, nor a lower bound at all.
val pp : Stdlib.Format.formatter -> t -> unit
Pretty-printer for abstract values
val hash_fold : Base.Hash.state -> t -> Base.Hash.state
Hashing
val is_top : t -> bool
Tests whether an interval is the largest interval
val singleton : int -> t
singleton n
represents the singleton set \{n\}
val is_singleton : t -> bool
Tests whether an interval contains exactly one element
Extracts the lower bound of an interval. Returns +\infty
if the interval is empty.
Extracts the upper bound of an interval. Returns -\infty
if the interval is empty.