IntInf asserts

Matthew Fluet Matthew Fluet <fluet@CS.Cornell.EDU>
Tue, 13 Nov 2001 09:56:48 -0500 (EST)


> > If this is final, could you mail me what change you want and I will do the
> > C routines. 
> 
> I would like to see it happen, but it's not near the top of my todo.
> I'm not sure where it is on Matthew's.

The changes to the C code should be minimal.  I would change

struct intInfRes_t	*
IntInf_do_add(pointer lhs, pointer rhs, pointer rspace, pointer frontier)

to

struct intInfRes_t      *
IntInf_do_add(pointer lhs, pointer rhs, pointer frontier)

and make the routines responsible for doing their own allocation.  The
result is still the same -- a pointer to the allocated intInf and the new
frontier.

Alternatively, we could do

struct intInfRes_t      *
IntInf_do_add(pointer lhs, pointer rhs, uint bytes, pointer frontier)

where bytes indicates the number of bytes available on the heap for this
function.  I wouldn't expect bytes would be used for anything but asserts.

But, I don't think that I'll get to this real soon.  I need to think a
little more about how limit checks are inserted and how to set things up
so that the kind of limit check coalescing that we want to do will be
possible.