From: Fazilatur R. <frahman@CS.MsState.EDU> - 2000-07-07 05:28:13
|
Hi can you tell me about following things: I use XSB version 2.1 I need to do some incore database manipulation to simulate global stacks. older versions of xsb supported such predicates like record/3, recorded/3, record_push/3, record_pop/3. e.g. record(arg1,arg2,arg3) => if there is a term in the internal database associated with arg1 and arg2 then this call fails. Otherwise a copy arg3 is stored in the internal database and associated to those keys. recorded(arg1,arg2,arg3) => if there is a term in the internal database associated with arg1 and arg2 then this term is unified with arg3.Otherwise this call fails. record_push(arg1,arg2,arg3) => The term associated with arg1 and arg2 is replaced by a list whose head is arg3 and whose tail is the previous term. record_pop(arg1,arg2,arg3) => arg3 is the head of the term associated with arg1 and arg2. The term associated with those keys is replaced by its tail. Will you please give me an idea how can i do above functions with this(2.1) version of XSB( it does not have the above built in predicates). I tried to do with assertz/1 and retract/1, but could not do it. can you give me an idea with some detail. waiting to hear from you soon...... Fazilatur Rahman |