pub trait TryToInterval {
// Required method
fn try_to_interval(&self) -> Result<Interval, Error>;
// Provided method
fn try_to_offset_interval(&self) -> Result<(i64, i64), Error> { ... }
}
Expand description
A conversion trait for abstract domains that can represent register values.
Required Methods§
sourcefn try_to_interval(&self) -> Result<Interval, Error>
fn try_to_interval(&self) -> Result<Interval, Error>
If self
represents an interval of absolute values (or can be widened to represent such an interval)
then return it if the interval is bounded.
For unbounded (i.e. Top
) intervals or if the abstract value does not represent absolute values return an error.
Provided Methods§
sourcefn try_to_offset_interval(&self) -> Result<(i64, i64), Error>
fn try_to_offset_interval(&self) -> Result<(i64, i64), Error>
If self
represents an interval of absolute values (or can be widened to represent such an interval)
then return it as an interval of signed integers of the form (start, end)
if the interval is bounded.
Else return an error.
Note that the conversion loses information about the bytesize of the values contained in the interval.