\documentclass[twoside,twocolumn]{jarticle}
\setlength{\textwidth}{14.5cm}
\setlength{\textheight}{22.5cm}
\setlength{\oddsidemargin}{0.75cm}
\setlength{\evensidemargin}{0.75cm}
%%% \setlength{\topmargin}{-2cm}

\usepackage{moreverb}

\newcommand{\dklic}{$BJ,;6(BKL1$B8@8l=hM}7O(B}
\newcommand{\cliser}{$B%/%i%$%"%s%H(B--$B%5!<%P(B}

\title{ KL1$B$K$h$k(B\dklic $B$N<BAu(B \\
  Distributed KL1 Implementation in KL1 }
\author{ G96P073-6 $B9bLZM42p(B $B>eED8&5f<<(B \\
  TAKAGI Yusuke, Ueda Lab. }
\date{ 2000$BG/(B2$B7n(B8$BF|(B }
\begin{document}
\maketitle

%---------------------------------------------------------------
\begin{abstract}
$B%M%C%H%o!<%/4D6-$NIa5Z$K$D$l!"(B
$BJ,;6%W%m%0%i%_%s%0$KBP$9$k<{MW$,9b$^$C$F$$$k!#(B
$B$7$+$7!"C`<!<jB3$-7?8@8l$K$h$kJ,;6=hM}$N5-=R$OHs>o$KHQ;($G$"$k!#(B

$BJB9TO@M}7?8@8l$O!"<B9T$N3FC10L$,JB9T$K<B9T$5$l!"(B
$B%W%m%;%94VDL?.$r@k8@E*$K5-=R$G$-$k!#(B
$B$^$?!"J,;6=hM}$OJB9T=hM}$N0lNc$J$N$G!"(B
$BJB9TO@M}7?8@8l$GJ,;6=hM}$r5-=R$9$k$N$O$4$/<+A3$J$3$H$G$"$m$&!#(B

KL1 $B$O!"JB9TO@M}7?8@8l(B GHC $B$r4p$K$7$?!"(B
$B<BMQE*$JJBNsO@M}7?8@8l$G$"$k!#(B
$B4{B8$NI8=`8@8l=hM}7O(B KLIC $B$NDj$a$kJBNs(BKL1 $B$G$O!"JBNs$N$?$a$N8B$i$l$?J,;6=hM}$H!"(B
Unix $B%l%Y%k$N%=%1%C%HDL?.$r5-=R$9$k$3$H$,$G$-$k$,!"(B
$B0lHL$NJ,;6=hM}$r8@8l%l%Y%k$G5-=R$9$k$3$H$O$G$-$J$$!#(B

$BK\8&5f$G$O!"(BKL1$B$rJ,;62=$9$k$?$a$K!"J,;6(BKL1$B$N6K>.ItJ,=89g(BdKL1$B$rDj$a!"(B
KLIC$B$rMxMQ$7$F!"(BdKL1$B$N8@8l=hM}7O(BdKLIC$B$r<BAu$7$?!#(B

dKL1 $B$K6a$$(B KLIC/KL1 $B$r<BAu8@8l$KA*$s$@$?$a$K!"(B
dKLIC $B<BAu$NK\<AItJ,$K=8Cf$G$-!"<BAu$N<j4V$O>/$J$+$C$?!#(B
$B$^$?!"(B
dKL1 $B$NDj$a$k==J,9-$$%/%i%9$N%W%m%0%i%`$KBP$7$F!"(B
$B5!3#K]Lu$r9T$&%"%k%4%j%:%`$r<($9$3$H$,$G$-$?!#(B
\end{abstract}

%---------------------------------------------------------------
\section{ keywords }
$BJB9TO@M}7?8@8l!"(BKL1$B!"J,;68@8l=hM}7O!#(B\\
Concurrent Logic Language, KL1, Distributed Implementation.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Concurrency, Languages, and Implementations
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{ $BJB9T$HJBNs!"J,;6(B }

\begin{center}
\fbox{$ \mbox{$BJBNs(B} \subset \mbox{$BJ,;6(B} \subset \mbox{$BJB9T(B} $}
\end{center}

$BJB9T(B {\bf (concurrent)} $B$H$O!"O@M}E*$JFHN)@-$rI=$7$^$9!#(B
$BJB9T$J%W%m%;%9$O!"(B
$B%?%$%`%7%'%"%j%s%0$K$h$C$FFHN)$KF0$$$F$bNI$$$7!"(B
$B$I$s$J=gHV$G$b!"0[$J$k7W;;5!$GF0$+$7$F$b$+$^$$$^$;$s!#(B

$BJBNs(B {\bf (parallel)} $B$H$O!"J*M}E*$JF1;~@-$rI=$7$^$9!#(B
$BJBNs%W%m%;%9$O!"(B
$BJ#?t$N%W%m%;%C%5$dJ#?t$N7W;;5!$K$h$C$FF1;~$KF0$-$^$9!#(B
$BJBNs$K<B9T$5$l$k%W%m%;%9$O!"JB9T$G$J$1$l$P$J$j$^$;$s!#(B
$B$^$?!"(B$ 1 $$BBf$N%W%m%;%C%5$OF1;~$KJ#?t$N%W%m%;%9$rF0$+$;$J$$$N$G!"(B
$BJBNs%W%m%;%9$OJ,;6$5$l$F$$$J$1$l$P$J$j$^$;$s!#(B
$B%W%m%;%9$N4V$GDL?.$,$"$k$H!"(B
$B$=$NItJ,$OJBNs$G$O$J$/C`<!(B (sequential) $B$KF0$-$^$9!#(B
$B$J$<$J$i!"Aw?.$O<u?.A0$K=*$o$j!"<u?.$OAw?.8e$K;O$^$k$+$i$G$9!#(B

$BJ,;6(B {\bf (distributed)} $B$H$O!"J*M}E*$J>l=j$N0c$$$rI=$7$^$9!#(B
$BJ,;6$5$l$k%W%m%;%9$O!"BgItJ,$,JB9T$G$"$k$Y$-$G$9!#(B
$B$J$<$J$i!"JB9T$G$J$$%W%m%;%9$rJ,;6$9$k$H(B
$BDL?.NL$,B?$/$J$j!"8zN($,0-$$$+$i$G$9!#(B
$BNc30$H$7$F!"%A%c%C%H%W%m%0%i%`$N$h$&$K!"(B
$BDL?.<+BN$,L\E*$G$"$kJ,;6%W%m%;%9$,$"$j$^$9!#(B

%---------------------------------------------------------------
\section{ GHC$B$H(BKL1$B!"(BdKL1 }

\begin{center}
\begin{tabular}{|c|c|}
\hline
Concurrency & Language \\
\hline \hline
concurrent & GHC \\
\hline
parallel & KL1 \\
\hline
distributed & dKL1, KL1j \\
\hline
\end{tabular}
\end{center}

Guarded Horn Clauses ({\bf GHC}) $B$O!"(B
$BJB9TO@M}7?8@8l$N(B$ 1 $$B$D$G$9!#(B
$BC`<!O@M}7?8@8l$N(B Prolog $B$K;w$?9=J8$r;}$C$F$$$^$9$,!"(B
$B%4!<%k$N<B9T$d@a$NA*Br$KM%@hEY$,7h$^$C$F$$$^$;$s!#(B
$BJB9T3HD%$5$l$?C`<!8@8l$G$OJB9T@-$rL@5-$7$^$9$,!"(B
$BJB9TO@M}7?8@8l$G$O5U$KC`<!@-$rL@5-$7$^$9!#(B
$BNc$($P!"(B
Unix/C $B$G$O(B fork $B%7%9%F%`%3!<%k$K$h$C$FJB9T$J%W%m%;%9$r@8@.$7$^$9$,!"(B
GHC $B$G$OJQ?t$r6&M-$9$k$3$H$K$h$C$F%4!<%k$rF14|$5$;$^$9!#(B

{\bf KL1} $B$O!"(B
GHC $B$K4p$E$/JBNsO@M}7?8@8l$G$9!#(B
GHC $B$NJB9T@-$K2C$($F!"%W%m%0%i%`$NO@M}E*$J0UL#$rJQ$($J$$(B
$BJBNs$N$?$a$N%W%i%0%^$,3HD%$5$l$F$$$^$9!#(B

{\bf dKL1} $B$O!"(B
KL1 $B$r3HD%$7$?J,;6O@M}7?8@8l$G$9!#(B
$BJ,;6%W%i%0%^$r3HD%$7$F!"1s3V=R8l8F$S=P$7$,$G$-$k$h$&$K$7$^$7$?!#(B
dKL1 $B$O(B KL1j $B$H$$$&J,;6(BKL1 $B$NItJ,=89g$G$9!#(B

%---------------------------------------------------------------
\section{ KL1 $B$N8@8l=hM}7O(B }

\begin{center}
\begin{tabular}{|c|c|}
\hline
Language & Implementations \\
\hline \hline
KL1 & (PIM), KLIC, KLIJava, etc. \\
\hline
dKL1, KL1j & dKLIC, KL1j \\
\hline
\end{tabular}
\end{center}

KL1 $B$N8@8l=hM}7O$H$7$F!"JBNs?dO@%^%7%s(B (PIM) $B>e$N8@8l=hM}7O!"(B
Unix/C $B>e$N(B {\bf KLIC}$B!"(B
Java $B>e$N(B KLIJava $B$J$I$,$"$j$^$9!#(B
KLIC $B$O!":G=i$NHFMQ(B KL1 $B8@8l=hM}7O$G!"(B
$B;v<B>e(B KL1 $B$NI8=`$rDj$a$F$$$^$9!#(B

KL1 $B$r4^$`J,;6(BKL1 $B$N8@8l=hM}7O$H$7$F!"(B
Java $B>e$N(B KL1j$B!"(B
KLIC $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$G$"$k!#(B
\begin{verbatim}
  "kl1://Host:Port"
\end{verbatim}
$B$3$3$G!"(BHost$B$O%[%9%HL>$J$$$7(BIP$B%"%I%l%9!"(B
Port$B$O%]!<%HHV9f$G$"$k!#(B
\end{description}

KL1j $B$O!"%W%m%;%94V$NDL?.O)$KL>A0$rIU$1$k$H$$$&(B
$BBg$-$JJ,;65!G=$bDs>'$7$^$7$?$,!"(B
$B$3$l$OJ,;6%W%i%0%^$h$j9b5i$J5!G=$J$N$G(B dKLIC $B$O%5%]!<%H$7$^$;$s!#(B

%---------------------------------------------------------------
\section{ $B1s3V8F$S=P$7$N;EAH$_(B }

$B%9%?%V(B--$B%9%1%k%H%s!&%b%G%k$O!"J,;64D6-$NF)2a@-$rDs6!$7$^$9!#(B
$B%/%i%$%"%s%H$O1s3V8F$S=P$7$N$D$b$j$G%9%?%V$r8F$S=P$7!"(B
$B%5!<%P$O%/%i%$%"%s%H$+$i8F$S=P$5$l$?$D$b$j$G!"(B
$B<B$O%9%1%k%H%s$+$i8F$S=P$5$l$^$9!#(B
$BJ,;6$KI,MW$JDL?.$O!"%9%?%V$H%9%1%k%H%s$,9T$$$^$9!#(B
(cf. OHP ``Stub-Skeleton Framework for Remote Call'')

dKLIC $B$O!"(B
KLIC $B$K$h$C$F5-=R$7$F$"$j$^$9!#(B
KLIC $B$K$O!"J,;6%W%i%0%^$,$"$j$^$;$s$,!"(B
Unix $B%l%Y%k$N%=%1%C%HDL?.$,$"$j$^$9!#(B
$B%=%1%C%HDL?.$r%9%?%V$H%9%1%k%H%s$NCf$KJD$89~$a$l$P!"(B
dKLIC $B$G5-=R$5$l$?%f!<%6%W%m%0%i%`$O(B
$BDL?.$r5$$K$9$kI,MW$,$"$j$^$;$s!#(B

dKL1 $B$K6a$$(B KL1 $B$K$h$C$F<BAu$r9T$C$?$N$G!"(B
Java $B$G5-=R$5$l$?(B KL1j $B$[$IB?$/$N;v$r9M$($J$/$F:Q$_$^$7$?!#(B
$B9M$($J$1$l$P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9%?%V$O!"(B
$B%/%i%$%"%s%H$KJQ?t$N6qBN2=$r65$($^$9!#(B
(cf. OHP ``Communication and Reduction for server/1'')

$B%/%i%$%"%s%HB&$H%5!<%PB&$N(B KLIC$BJQ?t$O0c$&$b$N$G$9$,!"(B
$BJQ?tI=$,JQ?t$NF10l@-$rJ]>Z$7$F$$$^$9!#(B
$B%=%1%C%H$NN>C<$K$"$k(B$ 2 $$B$D$NJQ?tI=$NF10l@-$O!"(B
$B%9%?%V$H%9%1%k%H%s$,J]>Z$7$^$9!#(B

$BJQ?tI=$O!"!JJQ?tL>!a(BKLIC$BJQ?t!K$H$$$&BP1~$r!"(B
$BJQ?tL>$G5U=g$K@0Ns$7$?%j%9%H$H$7$F<BAu$7$^$7$?!#(B
$BJQ?tL>$OC1D4A}2C$9$k@0?t$+$i@8@.$9$k$N$G!"(B
$B5U=g$K@0Ns$5$l$F$$$l$P(B$ O(1) $$B$G?7$7$$BP1~$rEPO?$G$-$k$+$i$G$9!#(B
(cf. OHP ``Variable Table for server/1'')

%---------------------------------------------------------------
\section{ $BD>Ns2=(B }

$B%=%1%C%H$K(B KL1$B9`$rN.$9$?$a!"(B
dKLIC $B$OD>Ns2=$r9T$$$^$9!#(B

$B%/%i%$%"%s%H$,(B KL1$B9`$rN.$=$&$H$9$k$H!"(B
$B%9%?%V$,D>Ns2=$7$?7k2L$rAw?.$7$^$9!#(B
$B%9%1%k%H%s$O<u?.$7$?%P%$%HNs$+$i!"(B
KL1$B9`$rI|85$7$^$9!#(B

$B%F%9%H$H%G%P%C%0$r$7$d$9$$$h$&$K!"(B
$BD>Ns2=$N7k2L$OL\$K8+$($kJ8;z$NNs$K$7$^$7$?!#(B
KLIC $B$K$OJ8;zNs7?$,$"$j$^$9$,!"(B
$BJ8;zNs7?$OFs=E0zMQId$G0O$s$GI=$9$?$a!"(B
$BD>Ns2=$N7k2L$OJ8;zNs$G$O$J$/!"(B
$BJ8;z$N:9J,%j%9%H$GI=$9$3$H$K$7$^$7$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%%%%%%%%%%%%%%%%%%%%%%
% Figures
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\onecolumn

\begin{figure}
\begin{center}
\begin{boxedverbatim}
  Local                           Remote

  remote call - - - - - - - -> predicate
       ||                          ||   meta-call
      stub ==================== skeleton
           socket communication
\end{boxedverbatim}
\end{center}
\caption{Stub-Skeleton Framework for Remote Predicate Call}
\end{figure}

%---------------------------------------------------------------
\begin{figure}
\begin{center}
\begin{boxedverbatim}
  Layer 3:  Remote Predicate Call
  Layer 2:  Marshalling / Unmarshalling
  Layer 1:  Variable Table
\end{boxedverbatim}
\end{center}
\caption{Layers in dKLIC Implementation}
\end{figure}

%---------------------------------------------------------------
\begin{figure}
\begin{center}
\begin{boxedverbatim}
         Client
  +-------------------+
  |    Remote Call    |
  |      in dKL1      |
  +-------------------+
            V  dKLIC Compiler
  +-------------------+
  |     Stub Call     |
  |     with Stub     |
  |    in KLIC/KL1    |
  +-------------------+
            V   KLIC Compiler
  +-------------------+
  |   Machine Code    |
  | executed at Local |
  +-------------------+
\end{boxedverbatim}
\begin{boxedverbatim}
            Server
  +-------------------------+
  | Remote-Called Predicate |
  |         in dKL1         |
  +-------------------------+
               V  dKLIC Compiler
  +-------------------------+
  |  Meta-Called Predicate  |
  |      with Skeleton      |
  |       in KLIC/KL1       |
  +-------------------------+
               V   KLIC Compiler
  +-------------------------+
  |      Machine Code       |
  |   executed at Remote    |
  +-------------------------+
\end{boxedverbatim}
\end{center}
\caption{Client-Server in dKL1}
\end{figure}

%---------------------------------------------------------------
\clearpage

\begin{figure}
\begin{center}
\begin{boxedverbatim}
  server(Queue) :- Queue = [] |
    true.
  server(Queue) :- Queue = [Request|Q] |
    Request = answer,
    server(Q).
\end{boxedverbatim}
\end{center}
\caption{Predicate server/1}
\end{figure}

\begin{figure}
\begin{center}
\begin{boxedverbatim}
                     Local   Remote
  Client        Stub                Skeleton        Server

                Marshall
  Remote-Call  -----------------------------> Meta-Call
                                                  Reduction
  Answer       <----------------------------- Instantiation
                                    Marshall

                     server(_0)
  server(Queue)     --------------->
    @node(Remote).                           server(Queue).
                     _0 = [_1|_2]              ||
  Queue=[Request|Q] --------------->         :- Queue = [Request|Q] |
                    <---------------           Request = answer,
                        _1 = answer            server(Q).
                     _2 = []                     ||
  Q=[]              --------------->         :- Q = [] |
                                               true.
\end{boxedverbatim}
\end{center}
\caption{Communication and Reduction for server/1}
\end{figure}

\begin{figure}
\begin{center}
\begin{boxedverbatim}
  ["_2"=Q, "_1"=Request, "_0"=Queue]
\end{boxedverbatim}
\end{center}
\caption{Variable Table for server/1}
\end{figure}

\end{document}
