\documentclass[12pt]{jarticle}
\usepackage{moreverb}

\begin{document}

%---------------------------------------------------------------
\begin{figure}
\begin{center}
\begin{tabular}{|c|c|c|}
\hline
Concurrency & Language & Implementations \\
\hline \hline
concurrent & GHC & \\
\hline
parallel & KL1 & (PIM), KLIC, KLIJava, etc. \\
\hline
distributed & dKL1, KL1j & dKLIC, KL1j \\
\hline
\end{tabular}
\end{center}
\caption{GHC vs. KL1, dKL1}
\end{figure}

%---------------------------------------------------------------
\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}
  Local                     Remote

  Stub                    Skeleton
  [Value=Name]--------[Name=Value]
               socket
\end{boxedverbatim}
\end{center}
\caption{Variable Tables}
\end{figure}

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

\begin{figure}
\begin{center}
\begin{boxedverbatim}
  +-----------------+
  |  User Program   |
  |     in dKL1     |
  +-----------------+
          | dKLIC Compiler
          V               +-----------------------+
  +-----------------+     | dKLIC Runtime Library |
  |   in KLIC/KL1   |     |      in KLIC/KL1      |
  +-----------------+     +-----------------------+
          V  KLIC Compiler           V  KLIC Compiler
  +-----------------+     +-----------------------+
  | in Machine Code |     |    in Machine Code    |
  +-----------------+-----+-----------------------+
                    Machine
\end{boxedverbatim}
\end{center}
\caption{dKLIC Configuration}
\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}
