@NEWMASTER@ C.all/plog/lib/record.pl robd Tue Feb  9 14:43:06 GMT 1988
134,136d
132a
;;; MEMBER

member(X,[X|L]).
member(X,[Y|L]) :- member(X,L).

.
130d
111c
   prolog_eval(apply('ERASED',quote(Ref),updater(valof(pdprops)))).
.
107,108c
instance(Ref,Term) :-
   prolog_eval(apply(quote(Ref)),Term).
.
104,105c
recorded1(Term,Ref) :-
   prolog_eval(apply(quote(Ref)),Term).
.
93,102c
recorded1(Term,Ref) :-
   prolog_eval(pdprops(quote(Ref)),'ERASED'), !,
.
90,91c
recorded(Key,Term,Ref) :-
   prolog_eval(prolog_record_terms(keyof(quote(Key))),List),
   member(Ref,List),
   recorded1(Term,Ref).
.
87,88c
recordz(Key,Term,Ref) :-
   prolog_eval(add_record(quote(Key),quote(Term),-1),Ref).
.
83,85c
recorda(Key,Term,Ref) :-
   prolog_eval(add_record(quote(Key),quote(Term),0),Ref).
.
75,77c
    else    [% prolog_record_explode(records), refer %], 0
    endif -> prolog_record_counts(key)
          -> prolog_record_terms(key);
.
69,73c
    if  position == 0
    then    if count >= prolog_record_countmax
            then    [% refer, prolog_record_explode(records) %], 0
            else    refer :: records, count + 1
.
64c
vars records key count;
.
62c
;;;
.
53c
;;; Adding a record
.
47c
vars rec;
;;;    'purging' =>
.
42,45c
;;; added Jonathan Laventhol, Wednesday 18th January 1984
;;; stacks all the entries in a list which are unmarked
;;;
.
36c
      mishap('Uninstantiated variable as key',[])
.
31,34c
      cons_with consword {% dest_characters(prolog_predword(term)), `/`,
                                dest_characters(prolog_nargs(term)) %}
.
28d
24,26c
;;; Here's how to go from a Prolog term to a key into that property
;;;
.
19,20c
    newproperty([], size, nil, true) -> prolog_record_terms;
.
17a
;;; the records will be purged at least every prolog_record_countmax times
;;;
50 -> prolog_record_countmax;

.
12,16c
vars prolog_record_terms        ;;; the records for the keys
     prolog_record_counts       ;;; addition count for each record
     prolog_record_countmax;    ;;; time to purge record?
.
1,5c
/*  --- University of Sussex POPLOG file -----------------------------------
 *  File:           $usepop/master/C.all/plog/lib/record.pl
 *  Purpose:        DEC System-10 Prolog style 'record' predicates
 *  Author:         Unknown, ??? (see revisions)
 *  Documentation:  HELP * RECORD
 *  Related Files:
.
@NEWMASTER@ robd Thu Jul 20 09:22:33 BST 1989
134,135d
47c
	lvars rec;
.
1c
/*  --- Copyright University of Sussex 1988. All rights reserved. ----------
.
