data base interface

Tomas By T.By at
Mon Sep 29 14:07:11 AEST 1997

Hi all,

I'm contemplating a Mercury interface to our GATE system, which for
these purposes can be seen as a custom (text processing oriented)
data base.

To allow for destructive update of the DB I suppose a 'state' type
is needed, like this:

   :- pred add_item(key,value,db_state,db_state).
   :- mode add_item(in,in,di,uo).

but access only involves one state:

   :- pred get_item(db_state,key,value).
   :- mode get_item(ui,in,out).

and 'open' would look something like this:

   :- pred db_open(string,db_state).
   :- mode db_open(in,uo).

Does this make sense? Any problems I should know about before taking
this further?

Btw, are there any plans to add a data base to the language as in Prolog?


More information about the users mailing list