=================================================================== RCS file: /home/cvs/OpenXM/doc/OpenXM-specs/formal-expression.tex,v retrieving revision 1.4 retrieving revision 1.8 diff -u -p -r1.4 -r1.8 --- OpenXM/doc/OpenXM-specs/formal-expression.tex 2000/09/08 17:14:54 1.4 +++ OpenXM/doc/OpenXM-specs/formal-expression.tex 2020/03/14 01:21:56 1.8 @@ -1,15 +1,15 @@ -%% $OpenXM: OpenXM/doc/OpenXM-specs/formal-expression.tex,v 1.3 2000/01/24 02:48:24 noro Exp $ -//&jp \section{ CMO の形式的表現方法 } +%% $OpenXM: OpenXM/doc/OpenXM-specs/formal-expression.tex,v 1.7 2000/09/09 21:59:13 takayama Exp $ +//&jp \section{ CMO ���綵√�����茵��憝�号�� } //&eg \section{ A formal expression of CMO } /*&jp -前の節で CMO の表現方法を形式的に定義せず, -CMO のPrimitive の表現法を説明したが, -ここでは, CMO の Lisp 風表現 (Lisp-like expression) -である +������膀���� CMO ���茵��憝�号�����綵√��������絎�臂�������, +CMO ���Primitive ���茵��憝�����茯�������������, +��������с��, CMO ��� Lisp 蘂�茵���� (Lisp-like expression) +��с����� CMOexpression -および前節で説明した CMO の標準 encoding 法をもう一度説明する. -% (タグの省略記法がほしい.) +��������喝��膀���ц����������� CMO ���罔�羣� encoding 羈����������筝�綺�茯����������. +% (��帥�違�������ヨ��羈������祉�����.) */ /*&eg In the previous section, we have explained the format of CMO's in the @@ -17,17 +17,18 @@ We again explain a standard encoding method of CMO, In this section, we will introduce CMOexpression which is like the bracket expression of Lisp. We again explain a standard encoding method of CMO, -which we have already explained in the previous section. +which we have already explained in the previous section, but +the explanation is more formal. */ /*&jp -まず, CMOexpression を形式的に 拡張 BNF 記法を用いて定義しよう. -タイプライタフォントでかかれた記号は終端記号を意味する. -``:'' は定義を意味する. ``$|$'' は''または''を意味する. -\{ X \} は X の 0 回以上の繰り返しを表す. -[ x ] は X が 0 回または 1 回出現することを表す. -この記法を用いると CMOexpression は次のように定義できる. +��障��, CMOexpression ���綵√�������� ��≦宍 BNF 荐�羈�������������絎�臂����������. +��帥�ゃ�������ゃ�帥�������潟����с�����������荐��垩��腟�腴�荐��垩�������潟�����. +``:'' ���絎�臂���������潟�����. ``$|$'' ���''��障�����''��������潟�����. +\{ X \} ��� X ��� 0 ���篁ヤ�����膵違��菴�������茵����. +[ x ] ��� X ��� 0 �����障����� 1 �����榊憗��������������茵����. +������荐�羈���������������� CMOexpression ���罨<�����������絎�臂���с�����. */ /*&eg @@ -56,10 +57,10 @@ By using this notation, CMOexpression is defined as fo \end{eqnarray*} */ /*&jp -終端記号 {\tt int32} は, 32 bit integer を表す, 10 進または 16 進の数字の -列である. -終端記号 {\tt string} は''文字''の列である. -終端記号 {\tt byte} は 8 bit データを表す, 10 進または 16 進の数字の列である. +腟�腴�荐���� {\tt int32} ���, 32 bit integer ���茵����, 10 ��蚊�障����� 16 ��蚊����医����� +�����с�����. +腟�腴�荐���� {\tt string} ���''���絖�''��������с�����. +腟�腴�荐���� {\tt byte} ��� 8 bit �����若�帥��茵����, 10 ��蚊�障����� 16 ��蚊����医����������с�����. */ /*&eg Terminal {\tt int32} is signed 32 bit integer. @@ -68,9 +69,9 @@ Terminal {\tt byte} is 8 bit data. */ /*&jp -CMOexpression にあらわれる各要素を区切るために {\tt ,} (コンマ) を用いてもよい. -{\tt cmo\_tag} は {\tt CMO\_} で始まる定数である. -CMOexpression で表現される object を CMObject と呼ぶ. +CMOexpression ���������������������荀�膣������阪�������������� {\tt ,} (��潟�潟��) ���������������������. +{\tt cmo\_tag} ��� {\tt CMO\_} ��у����障��絎���違�с�����. +CMOexpression ��ц;�憗�������� object ��� CMObject �����若��. */ /*&eg @@ -80,12 +81,12 @@ The comma ({\tt ,}) may be used to separate each eleme */ /*&jp -この表記法 CMOexpression を利用して, CMO Primitive の object を記述 -してみよう. -Object 自体の構造を説明するため, -BNF をもうすこし拡張して, 非終端記号, 終端記号名のみならず, 変数の -名前も書くことにする. こうすることにより, object の意味の説明も容易になる -からである. また ``---'' でコメントのはじまりを表すものとする. +������茵�荐�羈� CMOexpression ���������������, CMO Primitive ��� object ���荐�菴� +��������帥�����. +Object ���篏����罕�������茯����������������, +BNF ��������������������≦宍������, ���腟�腴�荐����, 腟�腴�荐��垸�������帥��������, 紊���違�� +�����������吾�����������������. ���������������������������, object ��������潟��茯�������絎号����������� +��������с�����. ��障�� ``---'' ��с�潟�<�潟�������������障�����茵�������������������. */ /*&eg Let us describe CMO's in the Primitive group. @@ -94,30 +95,30 @@ The start of comments are denoted by ``---''. The start of comments are denoted by ``---''. */ /*&jp -たとえば, (CMObject の) 32 bit integer である integer32 を -BNFで定義すれば, +������������, (CMObject ���) 32 bit integer ��с����� integer32 ��� +BNF��у��臂����������, \begin{center} Integer32 \ : \ ({\tt CMO\_INT32}, {\tt int32}) \end{center} -と書くのが本来の書き方による記法であるが, ここでは, +�����吾�������������ャ����吾����鴻��������荐�羈���с��������, ��������с��, \begin{eqnarray*} \mbox{Integer32} \ &:& \ ({\tt CMO\_INT32}, {\sl int32}\ n) \\ -& & \ \mbox{--- 32 bit integer $n$ を表す. } \\ +& & \ \mbox{--- 32 bit integer $n$ ���茵����. } \\ \end{eqnarray*} -と書くことを許すことにする. -このように書くことにより, 非終端記号 Integer32 は, +�����吾�����������荐宴�����������������. +�����������������吾�����������������, ���腟�腴�荐���� Integer32 ���, \begin{center} Integer32 \ : \ ({\tt CMO\_INT32}, {\tt int32}) \end{center} -のように, 終端記号 {\tt CMO\_INT32} と {\tt int32} を成分にもち, -CMObject の +������������, 腟�腴�荐���� {\tt CMO\_INT32} ��� {\tt int32} ������������������, +CMObject ��� ({\tt CMO\_INT32}, {\sl int32}\ n) -は, -32 bit integer $n$ を表現しているんだということが, 1 行でわかる. +���, +32 bit integer $n$ ���茵��憗�����������������������������������, 1 茵���с��������. */ /*&jp -この記法を用いて, 前節で導入した, Primitive の CMObject を -形式的に定義しよう. +������荐�羈�������������, ���膀���у����ャ�����, Primitive ��� CMObject ��� +綵√��������絎�臂����������. */ /*&eg By using this notation, let us define formally CMObjects in the group @@ -152,7 +153,7 @@ Document of CMObject/Primitive is at {\tt http://www.m */ -//&jp Cstring で, {\sl string} s の部分を {\tt byte} に分解すれば, +//&jp Cstring ���, {\sl string} s ������������ {\tt byte} ������茹c��������, //&eg In the definition of ``Cstring'', if we decompose ``{\sl string} s'' into bytes, then ``Cstring'' should be defined as /*&C \begin{eqnarray*} @@ -161,17 +162,17 @@ Document of CMObject/Primitive is at {\tt http://www.m \ldots, {\sl byte}\ \mbox{s[n-1]}) \end{eqnarray*} */ -//&jp となる. +//&jp ���������. /*&jp -また, +��障��, ``Group CMObject/Primitive requires nothing'' -は, 以下は, グループ CMObject/Primitive の定義であり, -このグループの CMObject を定義するのに, 要請される CMObject のグループは -ないことを示す. +���, 篁ヤ�����, ��違����若�� CMObject/Primitive ���絎�臂���с�����, +��������違����若����� CMObject ���絎�臂�������������, 荀�茫���������� CMObject �����違����若����� +���������������腓冴��. ``Error2, Null, Integer32, Datum, Cstring, Mathcap, List $\in$ CMObject/Primitive'' -は, グループ CMObject/Primitive には, Error2, Null, Integer32, -Datum, Cstring なるクラスの object が属することを示す. +���, ��違����若�� CMObject/Primitive ������, Error2, Null, Integer32, +Datum, Cstring ��������������鴻�� object ���絮����������������腓冴��. */ /*&eg ``Group CMObject/Primitive requires nothing'' @@ -188,8 +189,8 @@ are members of the group CMObject/Primitive. */ /*&jp -では, 実際のデータの表現の例をみてみよう. -たとえば, 32 bit integer の 1234 は, +��с��, 絎������������若�帥��茵��憗��箴������帥����帥�����. +������������, 32 bit integer ��� 1234 ���, */ /*&eg Let us see examples. @@ -201,8 +202,8 @@ Let us see examples. \end{center} */ /*&jp -とかく. -文字列 ``Hello'' は +���������. +���絖���� ``Hello'' ��� */ /*&eg The string ``Hello'' is expressed as @@ -212,58 +213,79 @@ The string ``Hello'' is expressed as ({\tt CMO\_STRING}, 5, "Hello") \end{center} */ -//&jp と書く. +//&jp �����吾��. /*&C */ /*&jp -CMOexpression と, CMObject の区別を理解しておくのは重要である. -たとえば +CMOexpression ���, CMObject �����阪�ャ�����茹c��������������������荀���с�����. +������������ \begin{center} ({\tt CMO\_INT32}, 234, "abc",({\tt CMO\_STRING})) \end{center} -は CMOexpression ではあるが, CMObject ではない. -これは, 文法的には正しいプログラムだが, なにをやるのかは全く不明な -プログラムと似ている. +��� CMOexpression ��с�����������, CMObject ��с��������. +���������, ���羈����������罩c�������������違�����������, �����������������������������鋇������� +��������違��������篌若��������. */ /*&jp -さて, Open math 風 (\cite{openmath}) -の XML 表現法も可能であり, その場合は, 上の二つの例は次のように -書く. +������, Open math 蘂� (\cite{openmath}) +��� XML 茵��憝����������純�с�����, ��������翫�����, 筝����篋���ゃ��箴����罨<����������� +��吾��. */ /*&eg -It is possible to express CMO by XML like Open math (\cite{openmath}). +CMO's are expressed by XML like Open Math (\cite{openmath}). See example below. */ /*&C \begin{verbatim} - -1234 - + + + 1234 + - -5 -"Hello" - + + 5 + "Hello" + + \end{verbatim} */ +//&jp \noindent cmo\_string ���罨<�����������������������������������. +//&eg \noindent cmo\_string may be expressed as follows. /*&C +\begin{verbatim} + + + 5 + 'H' 'e' 'l' + 'l' 'o' + + +\end{verbatim} */ +//&jp \noindent ��������翫����� cmo\_string ��� DTD ���������絎�臂����罨<�����������������. \\ +//&eg \noindent In this case, the DTD for cmo\_string is as follows; \\ +//&C \verb+ + +/*&C + +\bigbreak +*/ + /*&jp -次に, 標準 encoding 法を説明しよう. -標準 encoding 法では, cmo\_tag を ネットワークバイトオーダーの -32 bit integer {\tt int32} に, -その他のフィールドは, 定義に記述されているデータ型に従い, -byte データ {\tt byte} かまたは -ネットワークバイトオーダーの 32 bit integer {\tt int32} に, 変換する. +罨<��, 罔�羣� encoding 羈����茯�������������. +罔�羣� encoding 羈���с��, cmo\_tag ��� ��������������若�������ゃ�������若����若�� +32 bit integer {\tt int32} ���, +������篁���������c�若��������, 絎�臂����荐�菴違�������������������若�水�����緇����, +byte �����若�� {\tt byte} �����障����� +��������������若�������ゃ�������若����若�� 32 bit integer {\tt int32} ���, 紊����������. */ /*&eg Let us explain the standard encoding method. @@ -276,24 +298,26 @@ and byte data are encoded as it is. */ /*&jp -高速の通信方法を用いて -効率を重視する接続の場合には, {\tt int32} を network byte order -に変換する操作がおおきなオーバヘッドとなることが -報告されている. -100Mbps の通信路で 12Mbytes の {\tt CMO\_ZZ} の転送では -約 90\% の時間が network byte order への変換についやされているという -実験データもある. -効率を重視した encoding 法については後述する. +蕭����������篆≧�号�������������� +��合��������荀��������・膓������翫��������, {\tt int32} ��� network byte order +���紊�������������篏���������������������若����������������������������� +��怨�����������������. +100Mbps ������篆∴君��� 12Mbytes ��� {\tt CMO\_ZZ} ���荵∫����с�� +膣� 90\% ������������ network byte order ��吾��紊���������ゃ����������������������������� +絎�薑������若�帥��������. +��合��������荀������� encoding 羈������ゃ��������緇�菴違����� \ref{subsection:byteorder}. */ /*&eg When we are using a high speed network, the translation from the internal expression of 32 bit integers to network byte order may become a bottle neck. There are experimental data which presents that 90 percents of the transmission -time are +time are used for the translation to the network byte order to send {\tt CMO\_ZZ} of size -12M bytes on a 100Mbps network. -In a later section, we will discuss a protocol to avoid the translation. +12M bytes. +We used a 100Mbps network. +In a later section \ref{subsection:byteorder}, +we will discuss a protocol to avoid the translation. */ /*&C @@ -301,9 +325,9 @@ In a later section, we will discuss a protocol to avoi */ /*&jp -標準 encoding と CMOexpression の間の変換は容易である. -前節で用いたデータの表記法, -たとえば, +罔�羣� encoding ��� CMOexpression ���������紊�������絎号����с�����. +���膀���х�������������若�帥��茵�荐�羈�, +������������, */ /*&eg The translation between the standard encoding and CMOexpression @@ -320,7 +344,7 @@ For example, \end{center} */ /*&jp -は, CMOexpression +���, CMOexpression */ /*&eg is the encoding of the CMOexpression @@ -331,7 +355,7 @@ is the encoding of the CMOexpression \end{center} */ /*&jp -の 標準 encoding 法による表現である. +��� 罔�羣� encoding 羈����������茵��憗�с�����. */ /*&C @@ -341,23 +365,23 @@ is the encoding of the CMOexpression */ /*&jp -(実験的) -CMO は XML 規格に準拠している. -XML 規格の Attribute を binary encode するために -特別なタグ \\ +(絎�薑����) +CMO ��������� OX packets ��� XML 荀���� \cite{xml} ���羣����������������. +XML 荀���若�� Attribute ��� binary encode ��������������� +��劫�ャ����帥�� \\ */ /*&eg (Experimental) -CMO is complient to XML specification. -In order to encode ``Attribute'' in XML in a binary format, +CMO and OX packets are complient to XML specification \cite{xml}. +In order to encode ``Attribute'' in XML in our binary format, we have a tag: \\ */ //&C \verb! #define CMO_ATTRIBUTE_LIST (LARGEID+3) ! \\ /*&jp -を用意してある. +���������������������. */ /*&jp -たとえば Attribute {\tt font="Times-Roman" } は \\ +������������ Attribute {\tt font="Times-Roman" } ��� \\ */ /*&eg For example, the attibute {\tt font="Times-Roman" } is encoded as \\ @@ -369,15 +393,22 @@ For example, the attibute {\tt font="Times-Roman" } is \end{verbatim} */ /*&jp -と encoding される. +��� encoding ���������. */ -//*C +//&C /*&jp -この特別な CMO tag {\tt CMO\_ATTRIBUTE\_LIST} 以外は, -XML 表現では XML のタグとして理解される. +��������劫�ャ�� CMO tag {\tt CMO\_ATTRIBUTE\_LIST} 篁ュ�����, +XML 茵��憗�с�� XML �����帥�違�����������茹c��������. */ /*&eg All tags except this special CMO tag {\tt CMO\_ATTRIBUTE\_LIST} are XML tags in the CMO/XML expression. */ - +/*&jp +CMO/XML ��� {\it comment}, {\it for} ��������������ゃ����� +attributes ��� CMO binary expression �����������潟�潟�若��������������. +*/ +/*&eg +CMO/XML attributes such as {\it comment}, {\it for} +are not encoded in the CMO binary expression. +*/