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$H$,$G$-$k!#(B

\item $B%"%W%j%1!<%7%g%s(B.
$B2<0L$N@\B3%5!<%P!"8!:w%5!<%P!"%f!<%6Dj5A%5!<%P$J$I$rMxMQ$7$F!"(B
KL1 $B%W%m%0%i%^$OJ,;6%"%W%j%1!<%7%g%s$r5-=R$9$k$3$H$,$G$-$k!#(B
\end{enumerate}


\section{ $BK\8&5f$NL\I8$HHO0O(B }

\newcommand{\A}{\var{A}}
\newcommand{\B}{\var{B}}
\newcommand{\C}{\var{C}}
\newcommand{\D}{\var{D}}

\Comment
{$B5f6KL\I8(B
$B%M%C%H%o!<%/$K@\B3$5$l$?$"$i$f$k7W;;;q8;$,JB9T%*%V%8%'%/%H$H$7$F$N(B
$B%$%s%?%U%'%$%9$r;}$A!"0MMj$K1~$8$F8GM-$N7W;;$rDs6!$9$k$h$&$J(B
$B@k8@7?J,;64D6-$r<B8=$9$k!#(B}

$BK\8&5f$K$*$$$F$O!"Nc30=hM}$OL\I8$H$7$J$$!#(B

$BK\8&5f$G$O(B DKLIC $B=hM}7O$N:G2<0L%5!<%P$G$"$k(B dklicio $B$r<BAu$9$k!#(B
$B8!:w%5!<%P$=$NB>$N>e0L%5!<%P$OK\8&5f$NL\I8$G$O$J$/!"1~MQNc$H$9$k!#(B

DKLIC $B=hM}7O$N4pK\%5!<%P(B dklicio $B$O!"(B
$B0J2<$N$h$&$J@k8@7?J,;6%W%m%0%i%_%s%0$r2DG=$K$9$k!#(B

\begin{verbatim}
name(NS, Table) :- NS = [register(Name,Server) | NS1] |
  generic:new(merge, Clients, Server),
  Table1 = [(Name,Clients) | Table],
  name(NS1, Table1).
name(NS, Table) :- NS = [lookup(Name,Result) | NS1] |
  lookup(Name, Result, Table, Table1),
  name(NS1, Table1).

lookup(Name, Result, Table, Table_) :- Table = [] |
  Result = not_found(Name),
  Table_ = Table.
lookup(Name, Result, Table, Table_) :- Table = [(N,S)|Table1], N=Name |
  S = {Client, S1},
  Result = found(Client),
  Table_ = [(N,S1) | Table1].
otherwise.
lookup(Name, Result, Table, Table_) :- Table = [(N,S)|Table1] |
  Table_ = [(N,S) | Table1_],
  lookup(Name, Result, Table1, Table1_).
\end{verbatim}
$B$3$N(B name $B%5!<%P$O!"(Bregister/2 $B%a%C%;!<%8$K$h$C$F(B
$B%5!<%P$X$NDL?.O)(B Server $B$KL>A0(B Name $B$rIU$1$FI=$KEPO?$9$k!#(B
%
$B$^$?!"(Blookup/2 $B%a%C%;!<%8$K$h$C$F;XDj$5$l$?(B
Name $B$rI=$NCf$G8!:w$9$k!#(B
Name $B$,8+$D$+$C$?>l9g!"(BName $B$HL>IU$1$i$l$?%5!<%P$X$NDL?.O)(B
Server $B$X$H%^!<%8$5$l$kDL?.O)$N$&$A0lK\$rJV$9!#(B

$B$3$NJV$5$l$?DL?.O)(B Client $B$KBP$7$F(B
$B%/%i%$%"%s%H$O%5!<%P$X$NMW5a%a%C%;!<%8$r=q$-9~$s$GNI$$!#(B
%
$BJ#?t$N%/%i%$%"%s%H$+$i%5!<%P$,JB9T$K<u$1<h$k%a%C%;!<%8Ns$O!"(B
$B0lK\$NDL?.O)(B Server $B$K%^!<%8$5$l$F$$$k!#(B

$B%/%i%$%"%s%H!"(Bname $B%5!<%P!"%5!<%P$,$=$l$>$l(B
$B%[%9%H(B \A, \B, \C $B$K$"$k$H$-!"(B
DKLIC $B=hM}7O$N4{B8$N;n:n$G$O%/%i%$%"%s%H$+$i(B
name $B%5!<%P$rDL$8$F%5!<%P$X@\B3$5$l$?DL?.O)$KN.$l$k%a%C%;!<%8$O!"(B
name $B%5!<%P$,Cf7Q$r=*N;$7$F$b%[%9%H(B \B $B$rCf7Q$7$FDL?.$5$l$F$$$?!#(B

$BK\8&5f$G$O!"L$Dj5AJQ?t$ND>7k$dGQ4~$r8!=P$9$k$3$H$K$h$C$F!"(B
$B$3$N$h$&$JCf7Q$rGS=|$9$k$3$H$rL\I8$H$9$k!#(B

\vspace{1em}

$BK\>O$G$O!"@k8@7?J,;6%W%m%0%i%_%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