\documentclass{jarticle}

%\usepackage{amsmath}

\pagestyle{empty}

\title{\bf Open XM $B$N@_7W$H<BAu(B}
\author{
	Maekawa \\
	Noro \\
	: \\
	: \\
}
\date{ 1999$BG/(B, 11$B7n(B25$BF|(B}

\begin{document}
\maketitle
%\Large

{\Large OpenXM $B$N@_7W$H<BAu(B}


\vspace{5mm}

\begin{itemize} \normalsize \setlength{\itemsep}{-3mm}
\item Maekawa, Masahide  (Oct., 1999 -- : CVS server) 
\item Noro, Masayuki     (Jan., 1996 -- : OpenXM Protocol, asir99)
\item Ohara, Katsuyoshi  (Jan., 1998 -- : ox\_math)
\item Okutani, Yukio     (Oct., 1999 -- : asir contrib)
\item Takayama, Nobuki   (Jan., 1996 -- : OpenXM Protocol, kan)
\item Tamura, Yasushi    (Nov., 1998 -- : OpenMath proxy)
\end{itemize}


\section{OpenXM $B$H$O!)(B}

Open message eXchange protocol for Mathematics $B$NN,$G$"$k!#(B
$B$3$l$O!"F1<o!"$b$7$/$O0[$J$k?t3X%=%U%H$N4V$G!V%a%C%;!<%8!W$r(B
$B8r49$9$k$?$a$N5,Ls$G$"$k!#H/C<$OLnO$@59T@h@8$H9b;3?.5#@h@8$K$h$j!"(B
asir $B$H(B kan/sm1 $B$rAj8_$KJ8;zNs$G8F$S=P$95!G=$r<B8=$7$?$3$H$G$"$k!#(B
$B8=:_$G$O%U%j!<$N?t3X%=%U%H$r$`$9$s$G!"MM!9$J?t3X%=%U%H$r(B
$B#1$D$N%Q%C%1!<%8$H$7$F9%$-$J8@8l$+$i4JC1$K;H$($k$h$&$K$9$k(B
$B$N$,L\I8$G$"$k!#(B


\vspace{5mm}

$B%a%C%;!<%8$N8r49J}K!(B

$B%a%C%;!<%8$N8r49J}K!$K$OBgJL$7$F0J2<$N#2$D$NJ}K!$,$"$k!#(B

\begin{itemize}
\item $BJ8;zNs$K$h$k%a%C%;!<%8$N8r49(B

$BAj<jB&$N%7%9%F%`$NJ8K!$K=>$C$?%3%^%s%IJ8;zNs$K$h$j!"(B
$B%a%C%;!<%8$N8r49$r9T$J$&!#8zN(E*$G$J$$$,;H$$$d$9$$!#(B

\item $B6&DLI=8=7A<0$K$h$k%a%C%;!<%8$N8r49(B

$B3F%7%9%F%`Kh$K%a%C%;!<%8$rMQ0U$7$J$/$F:Q$`!#(B
$B8=:_$O(B OpenXM $B5,Ls%*%j%8%J%k$N%G!<%?7A<0$G$"$k!"(B
CMO(Common Mathematical Object format) $B7A<0!"(B
$B5Z$S(B asir $B$K$h$k(B binary $BI=8=7A<0$,$"$k!#(B
$B>-MhE*$K(B MP $B$d(B OpenMath $B$N(B XML, binary $B7A<0$J$I$N(B
$BB>$N7A<0$r$b8r49$G$-$k$h$&$K$7$F$"$k!#(B
CMO $B7A<0$K8B$C$F8@$($P!"J8;zNs$K$h$k%a%C%;!<%8$N(B
$B8r49$h$j$b$O$k$+$K8zN(E*$G$"$k!#(B
\end{itemize}


\section{OpenXM $B$N%a%C%;!<%89=B$(B}

OpenXM $B$G5,Dj$5$l$F$$$k%a%C%;!<%8$O2<$N?^$N$h$&$J(B
$BO@M}9=B$$r$7$F$*$j!"5,Ls$G$O%a%C%;!<%8$rO@M}E*$K(B
OX $BAX!"(B SM $BAX!"(B CMO $BAX$K$o$1$FDj5A$7$F$$$k!#(B

\[ \overbrace{
        \underbrace{
                \begin{tabular}{|c|} \hline
                        \hspace{15mm}   \\ \hline
                \end{tabular}
        }_{\mbox{OX tag}}
        \underbrace{
                \begin{tabular}{|c|} \hline
                        \hspace{80mm}  \\ \hline
                \end{tabular}
        }_{\begin{array}{l}
		\mbox{SM(Stack Machine command)}
			\rightarrow \mbox{$B%3%s%H%m!<%kMQ(B}\\
		\left. \begin{array}{l}
		\mbox{CMO $B%G!<%?(B} \\
		\mbox{ASIR $BFH<+(B binary} \\
		\mbox{OpenMath XML} \\
		\vdots \\
		\end{array} \right\} \rightarrow \mbox{$B%G!<%?MQ(B} \\
	\end{array}}
}^{\mbox{OX $B%a%C%;!<%8(B}} \]

$B$J$*!"(B SM(Stack Machine command) $B$H$O%W%m%;%9$K(B
$BBP$9$kF0:n$r;XDj$9$k%a%C%;!<%8$G$"$k!#(B
$B$3$l$i0J30$N5,Dj30$N%G!<%?$N%a%C%;!<%8$N$d$j$H$j$r(B
$B9T$J$&$3$H$b2DG=$H$J$C$F$*$j!"<B:]$K(B asir $B$H(B ifplot $B$N4V$G(B
$BFH<+I=8=$N%a%C%;!<%8$,$9$G$KB8:_$7!"<BAu$5$l$F$$$k!#(B


\section{OpenXM $B$G$N7W;;$N?J9T%b%G%k(B}

OpenXM $B$G$O(B server $B$r(B StackMachine $B$H$7$F$$$k!#(B

$B%*%V%8%'%/%H%G!<%?$,(B client $B$+$i(B server $B$XAw$i$l$F$b!"(B
$B$=$N%G!<%?$O;XDj$,$J$$8B$j(B server $B$N(B stack $B$K@Q$^$l$k$@$1$G!"(B
client $B$+$i$N0MMj$,$J$$8B$j!"(B server $B$O7W;;$r9T$J$o$J$$!#(B

 client $B$+$i%3%^%s%I$,Aw$i$l$k$H(B server $B$O(B stack $B$+$i(B
$BI,MW$J$@$1%G!<%?$r<h$j=P$7!"4X?t8F$S=P$7$N0z?t$H$7$F7W;;$r9T$J$$!"(B
$B7W;;7k2L$r(B stack $B$K@Q$`!#(B
 server $B$O$?$H$(%(%i!<$,5/$3$C$F$b!"(B
$B$?$@C1$K%(%i!<%*%V%8%'%/%H$r(B stack $B$K@Q$`$@$1$G!"(B
$B@Q6KE*$K%a%C%;!<%8$NAw?.$r9T$J$*$&$H$O$7$J$$!#(B

$B7k2L$r(B server $B$+$i(B client $B$XAw?.$5$;$k$?$a$K$O!"(B
client $B$,(B server $B$K7k2LAwIU0MMj$N%a%C%;!<%8$rAw$l$P$h$$!#(B
$B$3$N%a%C%;!<%8$r<u$1<h$C$?(B server $B$O(B stack $B$+$i%G!<%?$r(B
$B<h$j=P$7!"$3$3$G=i$a$F(B client $B$K%G!<%?$rAw?.$9$k!#(B

$B$D$^$j!"(B OpenXM $B5,Ls$G$N(B client, server $B%b%G%k$O!"(B
RPC $B$N$h$&$K(B client $B$,(B server $B$N1~Ez$rBT$D$o$1$G$O$J$/!"(B
$B!VHsF14|E*$KF0:n!W$r9T$J$&!#$b$7!"(B RPC $B$N$h$&$KF0:n(B
$B$5$;$?$$>l9g$G$b!"$3$N%b%G%k$J$i%(%_%e%l!<%7%g%s$b2DG=$G$"$k!#(B

$B0J2<!"%a%C%;!<%8$N8r49$rJ8;zNs$K$h$C$F9T$J$&J}K!$H(B
CMO $B7A<0$K$h$C$F9T$J$&J}K!$H$KJ,$1$F=g$rDI$C$F(B
$B@bL@$7$h$&!#(B

\begin{enumerate}
\item client $B$,(B server $B$X%G!<%?$rAw$k!#(B \\
server $B$O<u$1<h$C$?%G!<%?$r%9%?%C%/$K@Q$`!#(B

\begin{center}
client $\stackrel{\mbox{``3+5''}}{\longrightarrow}$ server \hspace{7mm}
\begin{tabular}{c} \hline
        \multicolumn{1}{|c|}{``3+5''} \\ \hline
        stack
\end{tabular}
\end{center}

\item client $B$,(B server $B$X7W;;<B9T0MMj$N%a%C%;!<%8$rAw$k!#(B
server $B$O7W;;$r<B9T$7!"7k2L$r(B stack $B$K@Q$`!#(B

\begin{center}
client $\stackrel{\mbox{executeStringByLocalParser}}{\longrightarrow}$ server \hspace{7mm}
\begin{tabular}{c} \hline
	\multicolumn{1}{|c|}{$8$} \\ \hline
	stack
\end{tabular}
\end{center}

$B!v%(%i!<$,5/$-$?>l9g$K$O%(%i!<%*%V%8%'%/%H$r(B stack $B$K@Q$`(B

\item client $B$,(B server $B$X7k2LAwIU0MMj$N%a%C%;!<%8$rAw$k!#(B
server $B$O(B stack $B$+$i%G!<%?$r<h$j=P$7!"(B client $B$XAw$k!#(B

\begin{center}
client
\begin{tabular}{c}
$\stackrel{\mbox{popString}}{\longrightarrow}$ \\
$\stackrel{\mbox{``8''}}{\longleftarrow}$
\end{tabular}%
server \hspace{7mm}
\begin{tabular}{c} %\hline
        \multicolumn{1}{|c|}{$$} \\ \hline
        stack
\end{tabular}
\end{center}
\end{enumerate}

client $B$H$7$F(B asir $B$rMQ$$!"0J>e$N$3$H$r9T$J$&>l9g$K$O(B
$B<!$N$h$&$K$J$k!#(B

\begin{verbatim}
1:ox_execute_string(0,"3+5;");
2:ox_pop_string(0);
\end{verbatim}

1 $B9TL\$GJ8;zNs(B ``{\tt 3+5;}'' $B$H!"(B SM $B%3%^%s%I(B
{\tt executeStringByLocalParser} $B$r(B server $BB&$XAw$C$F$$$k!#(B
$B$3$N;~E@$G(B server $BB&$N(B stack $B$K$O7W;;7k2L$,@Q$^$l$k!#(B
2 $B9TL\$G(B SM $B%3%^%s%I(B {\tt popString} $B$r(B server $BB&$XAw$j!"(B
stack $B$K@Q$^$l$F$$$k7W;;7k2L$rJ8;zNs7A<0$K(B
$BD>$7$F(B pop $B$7$F$b$i$C$F$$$k!#(B


\begin{enumerate}
\item client $B$,(B server $B$X%G!<%?$rAw$k!#(B \\
server $B$O<u$1<h$C$?%G!<%?$r%9%?%C%/$K@Q$`!#(B

\begin{center}
client $\stackrel{3,5,2,\mbox{``plus''}}{\longrightarrow}$ server \hspace{7mm}
\begin{tabular}{c} \hline
        \multicolumn{1}{|c|}{``plus''} \\ \hline
        \multicolumn{1}{|c|}{$2$} \\ \hline
        \multicolumn{1}{|c|}{$5$} \\ \hline
        \multicolumn{1}{|c|}{$3$} \\ \hline
        stack
\end{tabular}
\end{center}

\item client $B$,(B server $B$X7W;;<B9T0MMj$N%a%C%;!<%8$rAw$k!#(B
server $B$O7W;;$r<B9T$7!"7k2L$r(B stack $B$K@Q$`!#(B

\begin{center}
client $\stackrel{\mbox{executeFunction}}{\longrightarrow}$ server \hspace{7mm}
\begin{tabular}{c} \hline
	\multicolumn{1}{|c|}{$8$} \\ \hline
	stack
\end{tabular}
\end{center}

$B!v%(%i!<$,5/$-$?>l9g$K$O%(%i!<%*%V%8%'%/%H$r(B stack $B$K@Q$`(B

\item client $B$,(B server $B$X7k2LAwIU0MMj$N%a%C%;!<%8$rAw$k!#(B
server $B$O(B stack $B$+$i%G!<%?$r<h$j=P$7!"(B client $B$XAw$k!#(B

\begin{center}
client
\begin{tabular}{c}
$\stackrel{\mbox{popCMO}}{\longrightarrow}$ \\
$\stackrel{8}{\longleftarrow}$
\end{tabular}%
server \hspace{7mm}
\begin{tabular}{c} %\hline
	\multicolumn{1}{|c|}{$$} \\ \hline
	stack
\end{tabular}
\end{center}
\end{enumerate}

client $B$H$7$F(B asir $B$rMQ$$!"0J>e$N$3$H$r9T$J$&>l9g$K$O(B
$B<!$N$h$&$K$J$k!#(B

\begin{verbatim}
1:ox_push_cmo(0,3);
2:ox_push_cmo(0,5);
3:ox_push_cmo(0,2);
4:ox_push_cmo(0,"plus");
5:ox_push_cmd(0,269);
6:ox_pop_cmo(0);
\end{verbatim}

1-4 $B9TL\$GJ8;zNs(B ``{\tt 3+5;}'' $B$H!"(B SM $B%3%^%s%I(B
{\tt executeStringByLocalParser} $B$r(B server $BB&$XAw$C$F$$$k!#(B
$B$3$N;~E@$G(B server $BB&$N(B stack $B$K$O7W;;7k2L$,@Q$^$l$k!#(B
5 $B9TL\$G(B SM $B%3%^%s%I(B {\tt popString} $B$r(B server $BB&$XAw$j!"(B
stack $B$K@Q$^$l$F$$$k7W;;7k2L$rJ8;zNs7A<0$K(B
$BD>$7$F(B pop $B$7$F$b$i$C$F$$$k!#(B


\section{CMO $B$K$D$$$F(B}

CMO $B$O?^$N$h$&$K%G!<%?$N<oJL$r<($9(B tag $B$H%G!<%?K\BN$+$i@.$k!#(B

\[	\underbrace{
		\begin{tabular}{|c|} \hline
			\hspace{15mm}   \\ \hline
		\end{tabular}
	}_{\mbox{CMO tag}}
	\underbrace{
		\begin{tabular}{|c|} \hline
			\hspace{75mm}  \\ \hline
		\end{tabular}
	}_{\mbox{\begin{tabular}{l}
		$B%G!<%?(B \\
	\end{tabular}}} \]

ex. CMO\_ZZ($BB?G\D9@0?t(B)

\begin{tabular}{|c|c|c|c|c|} \hline
int32 CMO\_ZZ & int32 $n$ & int32 $b_0$ & $\cdots$ & int32 $b_{|n|-1}$ \\ \hline
\end{tabular}

\[ \mbox{sgn}(n) \times \left( b_0 \cdot (2^{32})^0
        + b_1 \cdot (2^{32})^1 + \cdots
        + b_{n-1} \cdot (2^{32})^{n-1} \right) \]
$B$rI=$9!#$?$@$7!"(B
$ \mbox{sgn}(n) = \left\{ \begin{array}{ll}
        1       & n>0 \\
        0       & n=0 \\
        -1      & n<0 \\ \end{array} \right. $ \\[10mm]

CMO\_ZZ $B$K$h$k(B $4294967298 = 1 \cdot 2^{32} + 2$ $B$NI=8=Nc(B

\[      \underbrace{\tt 00\ 00\ 00\ 14\ }_{CMO\_ZZ}
        \underbrace{\tt 00\ 00\ 00\ 02\ }_{$BD9$5(B 2 $B$+$D@5(B}
        \underbrace{\tt 00\ 00\ 00\ 02\ }_{b_0}
        \underbrace{\tt 00\ 00\ 00\ 01\ }_{b_1} \] \\

CMO\_ZZ $B$K$h$k(B $-1$ $B$NI=8=Nc(B

\[      \underbrace{\tt 00\ 00\ 00\ 14\ }_{CMO\_ZZ}
        \underbrace{\tt ff\ ff\ ff\ ff\ }_{$BD9$5(B 1 $B$+$DIi(B}
        \underbrace{\tt 00\ 00\ 00\ 01\ }_{b_0} \] \\

network byte order $B$r;H$C$?>l9g!"(B 10Mb $BDx$N%G!<%?E>Aw;~$K!"(B
byte order $B$NJQ49$K(B 8,9 $B3d$[$I$N;~4V$,$+$+$C$F$$$k!#(B


\section{MathCap $B$K$D$$$F(B}

server, client $B6&$K!"(B OpenXM $B$G5,Dj$5$l$F$$$kA4$F$N%a%C%;!<%8$r(B
$BM}2r$G$-$k$H$O8B$i$J$$!#(B
$B$7$+$7!"Aj<jB&$,M}2r$G$-$J$$%a%C%;!<%8$rAw$C$F$7$^$C$?>l9g$G$b(B
$B$=$l0J8e$N%a%C%;!<%8$N8r49$K;Y>c$r$-$?$5$J$$$h$&$K%a%C%;!<%8$N(B
$BD9$5$rE:IU$9$k$N$O8zN($,$o$k$/$J$k!#(B
$B$=$N$?$a!"(B OpenXM $B$G$OAj<jB&$NM}2r2DG=$J%a%C%;!<%8$r<}F@$9$kJ}K!$r(B
$BMQ0U$7$F$$$k!#(B MathCap $B$H$O$3$NM}2r2DG=$J%a%C%;!<%8<oJL$rI=$9%G!<%?$G$"$j!"(B
MathCap $B<+?H$b$^$?(B CMO $B$G$"$k!#$3$N$?$a!"APJ}6&$K>/$J$/$H$b(B
CMO $B$N4pK\E*$J%G!<%?7A<0(B(CMO\_MATHCAP, CMO\_LIST, CMO\_STRING, CMO\_INT32)$B$,(B
$BM}2r$G$-$kI,MW$,$"$k!#(B
\footnote{$B$3$l$i$O(B CMO Basic0 $B%0%k!<%W$H$7$F5,Dj$5$l$F$*$j!"(B
	OpenXM $B5,Ls$r<BAu$9$kA4$F$N(B server $B$,<BAu$7$F$$$k$H2>Dj$7$F$$$k!#(B}

MathCap $B$OD9$5$,(B 3 $B$N%j%9%H$+$i$J$k!#(B

\begin{center}
\begin{tabular}{|c|} \hline
        %(server $B>pJs(B) \\
        $[$ version number(INT32), server name(STRING) ,... $]$ \\[2mm] \hline

        %($BM}2r2DG=$J(B SM $B%a%C%;!<%8(B) \\
        $[$ ($BM}2r2DG=$J(B SM $B$N(B tag list) $]$ \\[2mm] \hline

        %($BM}2r2DG=$J%G!<%?7A<0(B) \\
        \\[-4mm]
        \begin{tabular}{|c|} \hline
                %($B=hM}2DG=$J%G!<%?$N7A<0(B) \\[2mm]
                $[$ (OX $B$N(B tag list) $]$ \\[2mm] \hline
                $[$ $B7A<0(B 1 $B$N>pJs(B, $B7A<0(B 2 $B$N>pJs(B,... $]$ \\[2mm] \hline
        \end{tabular} \\[6mm] \hline
\end{tabular}
\end{center}

\vspace{5mm}

$B8=:_$N(B ox\_asir $B$N(B MathCap

\begin{verbatim}
[ [199901160,ox_asir],
  [276,275,258,262,263,266,267,268,274
    ,269,272,265,264,273,300,270,271],
  [ [514,2144202544],
    [1,2,3,4,5,2130706433,2130706434
      ,17,19,20,21,22,24,25,26,31,27,33,60],
    [0,1]
  ]
]
\end{verbatim}

CMO $B$,M}2r$G$-$k$3$H$H!"(BCMO $B$NO@M}E*9=B$$,M}2r$G$-$k$3$H$H$O(B
$B$^$C$?$/JL$G$"$j!"8=:_$N$3$N(B MathCap $B$N%G!<%?7A<0$G$O!"(B
$BM}2r2DG=$JO@M}E*9=B$$^$G$O$o$+$i$J$$!#(B


\section{security $BBP:v(B}

OpenXM $B$G$O0J2<$N$h$&$J%;%-%e%j%F%#BP:v$r;\$7$F$$$k!#(B

\begin{itemize}
\item $B@\B3$,I,MW$J;~$K$@$1!"(B client $B$,(B server socket $B$r3+$/!#(B

 $B>o;~!"8}$r3+$1$F$$$k$o$1$G$O$J$$$N$G!"(B crack $B$5$l$K$/$$!#(B

\item client $B$,@\B3$9$k(B port number $B$r%i%s%@%`$K7hDj$9$k!#(B

 $B$I$3$K8}$,3+$/$+J,$+$i$J$$$N$G!"(B crack $B$5$l$K$/$/$J$k!#(B

\item $B@\B3;~$K(B client $B$,%i%s%@%`$J(B one time password $B$rH/9T$7!"(B
   $BG'>Z$r9T$J$&!#(B

 local $B$J%^%7%s$G$J$$$H(B password $B$,$o$+$i$J$$!#(B
\end{itemize}

$B@\B38e$N%a%C%;!<%8$NAw<u?.$K4X$7$F$O!"8=:_$O(B
$BI,MW$,$"$l$P(B ssh $B$N(B port forwarding $B5!G=$r(B
$B;H$($P$h$$$H9M$($F$$$k!#(B


\section{$BB>$N%W%m%8%'%/%H$K$D$$$F(B}

\begin{itemize}
\item OpenMath

        http://www.openmath.org/omsoc/index.html
        A.M.Cohen

	$B?t3XE*$J%*%V%8%'%/%H$N(B format $B$N7hDj!#(B
	$B<g$K(B XML $B$r;HMQ$7$F$$$k!#(B
\item NetSolve

        http://www.cs.utk.edu/netsolve/

	OpenXM $B$H;wDL$C$F$$$k$,!"?tCM7W;;;X8~$,9b$$!#(B
\item MP

        http://symbolicNet.mcs.kent.edu/SN/areas/protocols/mp.html

	tree $B9=B$!#(B
\item MCP

        http://horse.mcs.kent.edu/\~{ }pwang/
        pwang@mcs.kent.edu
\end{itemize}


\begin{verbatim}
<OMOBJ>
  <OMA>
    <OMS cd="basic" name="plus"/>
    <OMI> 1 </OMI>
    <OMV name="x"/>
  </OMA>
</OMOBJ>
\end{verbatim}


\section{$B8=:_Ds6!$7$F$$$k%=%U%H%&%'%"(B}

\begin{itemize}
\item asir + ox\_asir + ox\_sm1 + ox\_gnuplot + ox\_math
        + ox\_phc + ox\_tiger + OMproxy
\item sm1 + ox\_asir + ox\_sm1 + ox\_gnuplot + ox\_math
        + ox\_phc + ox\_tiger + OMproxy
\item Mathematica + ox\_asir + ox\_sm1 + ox\_gnuplot + ox\_math
        + ox\_phc + ox\_tiger + OMproxy
\item JAVA + ox\_asir + ox\_sm1
\end{itemize}


\vspace{10mm}
%\pagebreak

asir $B$K$h$k%G%b%W%m%0%i%`(B

\begin{verbatim}
This is Asir, Version 991116.
Copyright (C) FUJITSU LABORATORIES LIMITED.
3 March 1994. All rights reserved.
[0] load("xm");
1
xm Version 19991118. ox_help(0); ox_help("keyword"); for hel
p message 
[101] gnuplot_start();
0
[102] gnuplot(0,"plot sin(x);");
0
[103] Heat_N=20; heat(0.001,30);
\end{verbatim}


\vspace{5mm}

CVS $B%5!<%P(B, CVS web $B$rMQ$$$?3+H/(B(FreeBSD $B%9%?%$%k(B)


\end{document}
