Prolog library: cmisce.pl
pereira at sri-unix.UUCP
pereira at sri-unix.UUCP
Mon Aug 15 15:51:18 AEST 1983
/* CMISCE.PL : Miscellaneous routines (compiled)
UTILITY
Lawrence
Updated: 30 March 81
*/
%%% Compile this module
%%% CMISCE requires modules: LISTRO, FLAG
/* EXPORT */
:- public cgensym/2,
concat/3,
gensym/2.
/* MODES */
:- mode cgensym(+,?).
:- mode concat(+,+,?).
:- mode gensym(+,?).
cgensym(Prefix,V) :- gensym(Prefix,V), !.
cgensym(_,_).
concat(N1,N2,N3)
:- name(N1,Ls1),
name(N2,Ls2),
append(Ls1,Ls2,Ls3),
name(N3,Ls3).
gensym(Prefix,V)
:- var(V),
atom(Prefix),
flag(gensym(Prefix),N,N),
N2 is N + 1,
flag(gensym(Prefix),_,N2),
concat(Prefix,N2,V),
!.
More information about the Comp.sources.unix
mailing list