=================================================================== RCS file: /home/cvs/OpenXM/doc/OpenXM-specs/formal-expression.tex,v retrieving revision 1.1 retrieving revision 1.7 diff -u -p -r1.1 -r1.7 --- OpenXM/doc/OpenXM-specs/formal-expression.tex 2000/01/20 08:52:46 1.1 +++ OpenXM/doc/OpenXM-specs/formal-expression.tex 2000/09/09 21:59:13 1.7 @@ -1,10 +1,10 @@ -%% $OpenXM$ +%% $OpenXM: OpenXM/doc/OpenXM-specs/formal-expression.tex,v 1.6 2000/09/09 16:32:26 takayama Exp $ //&jp \section{ CMO ¤Î·Á¼°ÅªÉ½¸½ÊýË¡ } //&eg \section{ A formal expression of CMO } /*&jp Á°¤ÎÀá¤Ç CMO ¤Îɽ¸½ÊýË¡¤ò·Á¼°Åª¤ËÄêµÁ¤»¤º, -CMO ¤ÎBasic0 ¤Îɽ¸½Ë¡¤òÀâÌÀ¤·¤¿¤¬, +CMO ¤ÎPrimitive ¤Îɽ¸½Ë¡¤òÀâÌÀ¤·¤¿¤¬, ¤³¤³¤Ç¤Ï, CMO ¤Î Lisp É÷ɽ¸½ (Lisp-like expression) ¤Ç¤¢¤ë CMOexpression @@ -12,12 +12,13 @@ CMOexpression % (¥¿¥°¤Î¾Êάµ­Ë¡¤¬¤Û¤·¤¤.) */ /*&eg -In the previous setion, we have explained the format of CMO's in the -Basic0 group. +In the previous section, we have explained the format of CMO's in the +Primitive group. 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 @@ -60,13 +61,11 @@ By using this notation, CMOexpression is defined as fo Îó¤Ç¤¢¤ë. ½ªÃ¼µ­¹æ {\tt string} ¤Ï''ʸ»ú''¤ÎÎó¤Ç¤¢¤ë. ½ªÃ¼µ­¹æ {\tt byte} ¤Ï 8 bit ¥Ç¡¼¥¿¤òɽ¤¹, 10 ¿Ê¤Þ¤¿¤Ï 16 ¿Ê¤Î¿ô»ú¤ÎÎó¤Ç¤¢¤ë. - */ -/*&jp +/*&eg Terminal {\tt int32} is signed 32 bit integer. Terminal {\tt string} is a byte array which usually expresses a string. Terminal {\tt byte} is 8 bit data. - */ /*&jp @@ -82,7 +81,7 @@ The comma ({\tt ,}) may be used to separate each eleme */ /*&jp -¤³¤Îɽµ­Ë¡ CMOexpression ¤òÍøÍѤ·¤Æ, CMO Basic0 ¤Î object ¤òµ­½Ò +¤³¤Îɽµ­Ë¡ CMOexpression ¤òÍøÍѤ·¤Æ, CMO Primitive ¤Î object ¤òµ­½Ò ¤·¤Æ¤ß¤è¤¦. Object ¼«ÂΤι½Â¤¤òÀâÌÀ¤¹¤ë¤¿¤á, BNF ¤ò¤â¤¦¤¹¤³¤·³ÈÄ¥¤·¤Æ, Èó½ªÃ¼µ­¹æ, ½ªÃ¼µ­¹æ̾¤Î¤ß¤Ê¤é¤º, ÊÑ¿ô¤Î @@ -90,7 +89,7 @@ BNF ¤ò¤â¤¦¤¹¤³¤·³ÈÄ¥¤·¤Æ, Èó½ªÃ¼µ­¹æ, ½ªÃ¼µ­¹æ̾¤Î¤ß¤Ê ¤«¤é¤Ç¤¢¤ë. ¤Þ¤¿ ``---'' ¤Ç¥³¥á¥ó¥È¤Î¤Ï¤¸¤Þ¤ê¤òɽ¤¹¤â¤Î¤È¤¹¤ë. */ /*&eg -Let us describe CMO's in the Basic0 group. +Let us describe CMO's in the Primitive group. In order to explain the meaning of objects, we may also put variable names to CMOexpressions. The start of comments are denoted by ``---''. @@ -117,25 +116,22 @@ CMObject ¤Î ¤Ï, 32 bit integer $n$ ¤òɽ¸½¤·¤Æ¤¤¤ë¤ó¤À¤È¤¤¤¦¤³¤È¤¬, 1 ¹Ô¤Ç¤ï¤«¤ë. */ -/*&eg -(This part has not yet been translated.) -*/ /*&jp -¤³¤Îµ­Ë¡¤òÍѤ¤¤Æ, Á°Àá¤ÇƳÆþ¤·¤¿, Basic0 ¤Î CMObject ¤ò +¤³¤Îµ­Ë¡¤òÍѤ¤¤Æ, Á°Àá¤ÇƳÆþ¤·¤¿, Primitive ¤Î CMObject ¤ò ·Á¼°Åª¤ËÄêµÁ¤·¤è¤¦. */ /*&eg By using this notation, let us define formally CMObjects in the group -Basic0. +Primitive. */ /*&C \bigbreak \noindent -Group CMObject/Basic0 requires nothing. \\ -Error2, Null, Integer32, Datum, Cstring, Mathcap, List $\in$ CMObject/Basic0. \\ -Document of CMObject/Basic0 is at {\tt http://www.math.kobe-u.ac.jp/OpenXM} +Group CMObject/Primitive requires nothing. \\ +Error2, Null, Integer32, Datum, Cstring, Mathcap, List $\in$ CMObject/Primitive. \\ +Document of CMObject/Primitive is at {\tt http://www.math.kobe-u.ac.jp/OpenXM} (in English and Japanese) \\ \begin{eqnarray*} \mbox{Error2}&:& ({\tt CMO\_ERROR2}, {\sl CMObject}\, \mbox{ob}) \\ @@ -169,24 +165,23 @@ Document of CMObject/Basic0 is at {\tt http://www.math //&jp ¤È¤Ê¤ë. /*&jp ¤Þ¤¿, -``Group CMObject/Basic0 requires nothing'' -¤Ï, °Ê²¼¤Ï, ¥°¥ë¡¼¥× CMObject/Basic0 ¤ÎÄêµÁ¤Ç¤¢¤ê, +``Group CMObject/Primitive requires nothing'' +¤Ï, °Ê²¼¤Ï, ¥°¥ë¡¼¥× CMObject/Primitive ¤ÎÄêµÁ¤Ç¤¢¤ê, ¤³¤Î¥°¥ë¡¼¥×¤Î CMObject ¤òÄêµÁ¤¹¤ë¤Î¤Ë, Í×ÀÁ¤µ¤ì¤ë CMObject ¤Î¥°¥ë¡¼¥×¤Ï ¤Ê¤¤¤³¤È¤ò¼¨¤¹. ``Error2, Null, Integer32, Datum, Cstring, Mathcap, List -$\in$ CMObject/Basic0'' -¤Ï, ¥°¥ë¡¼¥× CMObject/Basic0 ¤Ë¤Ï, Error2, Null, Integer32, +$\in$ CMObject/Primitive'' +¤Ï, ¥°¥ë¡¼¥× CMObject/Primitive ¤Ë¤Ï, Error2, Null, Integer32, Datum, Cstring ¤Ê¤ë¥¯¥é¥¹¤Î object ¤¬Â°¤¹¤ë¤³¤È¤ò¼¨¤¹. */ /*&eg -¤Þ¤¿, -``Group CMObject/Basic0 requires nothing'' -means that there is no super group to define CMO's in the group Basic0. +``Group CMObject/Primitive requires nothing'' +means that there is no super group to define CMO's in the group Primitive. ``Error2, Null, Integer32, Datum, Cstring, Mathcap, List -$\in$ CMObject/Basic0'' +$\in$ CMObject/Primitive'' means that Error2, Null, Integer32, Datum, Cstring -are members of the group CMObject/Basic0. +are members of the group CMObject/Primitive. */ /*&C @@ -233,25 +228,57 @@ CMOexpression ¤È, CMObject ¤Î¶èÊ̤òÍý²ò¤·¤Æ¤ª¤¯¤Î¤Ï½ÅÍ ¤³¤ì¤Ï, ʸˡŪ¤Ë¤ÏÀµ¤·¤¤¥×¥í¥°¥é¥à¤À¤¬, ¤Ê¤Ë¤ò¤ä¤ë¤Î¤«¤ÏÁ´¤¯ÉÔÌÀ¤Ê ¥×¥í¥°¥é¥à¤È»÷¤Æ¤¤¤ë. +*/ + +/*&jp ¤µ¤Æ, Open math É÷ (\cite{openmath}) -¤Î SGML ɽ¸½Ë¡¤â²Äǽ¤Ç¤¢¤ê, ¤½¤Î¾ì¹ç¤Ï, ¾å¤ÎÆó¤Ä¤ÎÎã¤Ï¼¡¤Î¤è¤¦¤Ë +¤Î XML ɽ¸½Ë¡¤â²Äǽ¤Ç¤¢¤ê, ¤½¤Î¾ì¹ç¤Ï, ¾å¤ÎÆó¤Ä¤ÎÎã¤Ï¼¡¤Î¤è¤¦¤Ë ½ñ¤¯. +*/ +/*&eg +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 ¤ò ¥Í¥Ã¥È¥ï¡¼¥¯¥Ð¥¤¥È¥ª¡¼¥À¡¼¤Î @@ -278,17 +305,19 @@ and byte data are encoded as it is. 100Mbps ¤ÎÄÌ¿®Ï©¤Ç 12Mbytes ¤Î {\tt CMO\_ZZ} ¤ÎžÁ÷¤Ç¤Ï Ìó 90\% ¤Î»þ´Ö¤¬ network byte order ¤Ø¤ÎÊÑ´¹¤Ë¤Ä¤¤¤ä¤µ¤ì¤Æ¤¤¤ë¤È¤¤¤¦ ¼Â¸³¥Ç¡¼¥¿¤â¤¢¤ë. -¸úΨ¤ò½Å»ë¤·¤¿ encoding Ë¡¤Ë¤Ä¤¤¤Æ¤Ï¸å½Ò¤¹¤ë. +¸úΨ¤ò½Å»ë¤·¤¿ 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 @@ -329,4 +358,57 @@ is the encoding of the CMOexpression ¤Î ɸ½à encoding Ë¡¤Ë¤è¤ëɽ¸½¤Ç¤¢¤ë. */ +/*&C +\bigbreak + +*/ + +/*&jp +(¼Â¸³Åª) +CMO ¤ª¤è¤Ó OX packets ¤Ï XML µ¬³Ê \cite{xml} ¤Ë½àµò¤·¤Æ¤¤¤ë. +XML µ¬³Ê¤Î Attribute ¤ò binary encode ¤¹¤ë¤¿¤á¤Ë +ÆÃÊ̤ʥ¿¥° \\ +*/ +/*&eg +(Experimental) +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" } ¤Ï \\ +*/ +/*&eg +For example, the attibute {\tt font="Times-Roman" } is encoded as \\ +*/ +/*&C +\begin{verbatim} + (CMO_ATTRIBUTE (CMO_LIST + (CMO_LIST (CMO_STRING,"font") (CMO_STRING, "Times-Roman")))) +\end{verbatim} +*/ +/*&jp +¤È encoding ¤µ¤ì¤ë. +*/ +//&C +/*&jp +¤³¤ÎÆÃÊÌ¤Ê CMO tag {\tt CMO\_ATTRIBUTE\_LIST} °Ê³°¤Ï, +XML ɽ¸½¤Ç¤Ï XML ¤Î¥¿¥°¤È¤·¤ÆÍý²ò¤µ¤ì¤ë. +*/ +/*&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. +*/