Boost logo

Boost :

From: Rozental, Gennadiy (Gennadiy_at_[hidden])
Date: 2002-09-03 16:35:35


> I was working in the same domain for some time. Interval arithmetic doe=
s is
> very useful here. Note though that in most cases we need more generic
> abstraction - ordered list of intervals possibly open or half open.

> Thanks Gennadiy for confirming my suspicion. If you want half-open
> intervals, though, a range library would be more suited than an interval
arithmetic library.
> We cannot (and will not) represent all kinds of intervals. This would
unnecessarily burden the library, and for most
> users it would not represent a benefit.

IMO plain interval would not be enough in many domains, not only static
analysis. Let say you want to represent the results of solving multiple
inequations.
You immediately face the need for this kind of more generic abstraction. Or
area of definition for variable. Even more simple example: How you going to
represent result of operation 1/x where x = [-1, 1]?
   From what I view, without such generalization the library will have much
more limited usability.

> > And IMO interval library should support this.
> > Gennadiy.

> IMHO, this is the topic for another library on top of the interval
> library. As much as I would like to solve the world's greatest problems,
> I have to draw a circle and work within.

I think it just one small step ahead in terms of generalization. In most
cases it does not require too much efforts. Instead of operation over pair
you will operate over list of pair. There are some specific challenges of
course. Like we will need intersection, union and difference. But it should
be pretty strait forward also. You current interval will became just a
particular case for more abstract implementation.

Gennadiy.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk