Header menu logo B2R2

IntervalMap Module

Provides functions for creating or manipulating interval maps.

Functions and values

Function or value Description

IntervalMap.add i v arg3

Full Usage: IntervalMap.add i v arg3

Parameters:
Returns: IntervalMap<'a>

Adds an item to the interval tree.

i : AddrRange
v : 'a
arg2 : IntervalMap<'a>
Returns: IntervalMap<'a>

IntervalMap.addOrReplace i v m

Full Usage: IntervalMap.addOrReplace i v m

Parameters:
Returns: IntervalMap<'V>

Adds a new mapping to the IntervalMap in case there is no exactly matching interval. If there is a matching interval, this function will replace the existing mapping with the new one.

i : AddrRange
v : 'V
m : IntervalMap<'V>
Returns: IntervalMap<'V>

IntervalMap.contains range m

Full Usage: IntervalMap.contains range m

Parameters:
Returns: bool

Checks whether the exact range exists in the interval tree.

range : AddrRange
m : IntervalMap<'V>
Returns: bool

IntervalMap.containsAddr addr m

Full Usage: IntervalMap.containsAddr addr m

Parameters:
Returns: bool

Checks whether the given address exists in the interval tree.

addr : Addr
m : IntervalMap<'a>
Returns: bool

IntervalMap.empty

Full Usage: IntervalMap.empty

Returns: IntervalMap<'V>

Empty interval tree.

Returns: IntervalMap<'V>

IntervalMap.findAll range m

Full Usage: IntervalMap.findAll range m

Parameters:
Returns: 'a list

Finds all overlapping intervals in the given range.

range : AddrRange
m : IntervalMap<'a>
Returns: 'a list

IntervalMap.fold fn acc arg3

Full Usage: IntervalMap.fold fn acc arg3

Parameters:
Returns: 'a

Folds the elements of the interval map.

fn : 'a -> AddrRange -> 'V -> 'a
acc : 'a
arg2 : IntervalMap<'V>
Returns: 'a

IntervalMap.includeRange range arg2

Full Usage: IntervalMap.includeRange range arg2

Parameters:
Returns: bool

Checks whether the given address interval is included in any of the intervals in the interval map.

range : AddrRange
arg1 : IntervalMap<'a>
Returns: bool

IntervalMap.isEmpty m

Full Usage: IntervalMap.isEmpty m

Parameters:
Returns: bool

Checks if the given interval tree is empty.

m : IntervalMap<'V>
Returns: bool

IntervalMap.iter fn m

Full Usage: IntervalMap.iter fn m

Parameters:

Iterates the elements of the interval map.

fn : AddrRange -> 'a -> unit
m : IntervalMap<'a>

IntervalMap.remove i arg2

Full Usage: IntervalMap.remove i arg2

Parameters:
Returns: IntervalMap<'a>

Removes the exactly matched interval from the map.

i : AddrRange
arg1 : IntervalMap<'a>
Returns: IntervalMap<'a>

IntervalMap.replace i v arg3

Full Usage: IntervalMap.replace i v arg3

Parameters:
Returns: IntervalMap<'V>

Replaces the item in the interval tree that exactly matches the given range with the new value. This function will raise an exception if there is no exactly matching interval.

i : AddrRange
v : 'V
arg2 : IntervalMap<'V>
Returns: IntervalMap<'V>

IntervalMap.tryFind range m

Full Usage: IntervalMap.tryFind range m

Parameters:
Returns: 'V option

Finds the first interval that exactly matches the given range.

range : AddrRange
m : IntervalMap<'V>
Returns: 'V option

IntervalMap.tryFindByMin addr arg2

Full Usage: IntervalMap.tryFindByMin addr arg2

Parameters:
Returns: 'a option

Finds an interval that has the same low bound (Min) as the given address. If there is no such interval, this function returns None.

addr : Addr
arg1 : IntervalMap<'a>
Returns: 'a option

Type something to start searching.