[m-dev.] Aditi updates

Simon Taylor stayl at cs.mu.OZ.AU
Fri Dec 4 21:42:10 AEDT 1998


> > :- pred edge_bulk_insert(pred(int::in, int::in, aditi__state::ui) is nondet, 
> > 		aditi__state::di, aditi__state::uo) is det.
> > 		
> > :- pred edge_bulk_delete(pred(int::in, int::in, aditi__state::ui) is nondet, 
> > 		aditi__state::di, aditi__state::uo) is det.
> 
> I don't understand the last two.  How do they work?

Sorry, a typo there -- the modes are meant to be `out' not `in', as you
described later. 

 > Assuming a primary key on attribute 1 (the first integer attribute),
> > we also get:
> 
> Why should any extra relations be generated for tables with indices?
> Can't you use the same predicate name?  If you can't because you are
> generating Mercury rather than pragma C code, maybe the time has come
> to finally allow different Mercury code for different modes of the
> same predicate.  It would certainly seem cleaner to me not to have a
> different predicate name for each mode.

It's not a matter of different code for different modes - the deletion
predicate needs to specify which key is being used. The different deletion
predicates for different keys may have different type signatures since
only the key attributes are passed in.

Simon.



More information about the developers mailing list