[BACK]Return to cmo-basic1.tex CVS log [TXT][DIR] Up to [local] / OpenXM / doc / OpenXM-specs

Diff for /OpenXM/doc/OpenXM-specs/cmo-basic1.tex between version 1.6 and 1.11

version 1.6, 2000/01/24 07:49:58 version 1.11, 2001/08/27 05:39:15
Line 1 
Line 1 
 %% $OpenXM: OpenXM/doc/OpenXM-specs/cmo-basic1.tex,v 1.5 2000/01/24 07:36:35 noro Exp $  %% $OpenXM: OpenXM/doc/OpenXM-specs/cmo-basic1.tex,v 1.10 2001/04/10 11:56:29 takayama Exp $
 //&jp \section{ 数, 多項式 の  CMO 表現 }  //&jp \section{ 数, 多項式 の  CMO 表現 }
 //&eg \section{ CMOexpressions for numbers and polynomials }  //&eg \section{ CMOexpressions for numbers and polynomials }
 \label{sec:basic1}  \label{sec:basic1}
Line 64  ZZ, QQ, Zero, Rational, Indeterminate,$\in$ CMObject/B
Line 64  ZZ, QQ, Zero, Rational, Indeterminate,$\in$ CMObject/B
 \mbox{Zero} &:& ({\tt CMO\_ZERO}) \\  \mbox{Zero} &:& ({\tt CMO\_ZERO}) \\
 & & \mbox{ --- ユニバーサルな ゼロを表す. } \\  & & \mbox{ --- ユニバーサルな ゼロを表す. } \\
 \mbox{ZZ}         &:& ({\tt CMO\_ZZ},{\sl int32}\, {\rm f}, {\sl byte}\, \mbox{a[1]}, \ldots  \mbox{ZZ}         &:& ({\tt CMO\_ZZ},{\sl int32}\, {\rm f}, {\sl byte}\, \mbox{a[1]}, \ldots
 {\sl byte}\, \mbox{a[m]} ) \\  {\sl byte}\, \mbox{a[$|$f$|$]} ) \\
 &:& \mbox{ --- bignum をあらわす. a[i] についてはあとで説明}\\  &:& \mbox{ --- bignum をあらわす. a[i] についてはあとで説明}\\
 \mbox{QQ}        &:& ({\tt CMO\_QQ}, {\sl ZZ}\, {\rm a}, {\sl ZZ}\, {\rm b}) \\  \mbox{QQ}        &:& ({\tt CMO\_QQ},
                         {\sl int32}\, {\rm m}, {\sl byte}\, \mbox{a[1]}, \ldots, {\sl byte}\, \mbox{a[$|$m$|$]},
                         {\sl int32}\, {\rm n}, {\sl byte}\, \mbox{b[1]}, \ldots, {\sl byte}\, \mbox{b[$|$n$|$]})\\
 & & \mbox{ --- 有理数 $a/b$ を表す. } \\  & & \mbox{ --- 有理数 $a/b$ を表す. } \\
 \mbox{Rational}        &:& ({\tt CMO\_RATIONAL}, {\sl CMObject}\, {\rm a}, {\sl CMObject}\, {\rm b}) \\  \mbox{Rational}        &:& ({\tt CMO\_RATIONAL}, {\sl CMObject}\, {\rm a}, {\sl CMObject}\, {\rm b}) \\
 & & \mbox{ ---  $a/b$ を表す. } \\  & & \mbox{ ---  $a/b$ を表す. } \\
Line 84  ZZ, QQ, Zero, Rational, Indeterminate,$\in$ CMObject/B
Line 86  ZZ, QQ, Zero, Rational, Indeterminate,$\in$ CMObject/B
 \mbox{Zero} &:& ({\tt CMO\_ZERO}) \\  \mbox{Zero} &:& ({\tt CMO\_ZERO}) \\
 & & \mbox{ --- Universal zero } \\  & & \mbox{ --- Universal zero } \\
 \mbox{ZZ}         &:& ({\tt CMO\_ZZ},{\sl int32}\, {\rm f}, {\sl byte}\, \mbox{a[1]}, \ldots  \mbox{ZZ}         &:& ({\tt CMO\_ZZ},{\sl int32}\, {\rm f}, {\sl byte}\, \mbox{a[1]}, \ldots
 {\sl byte}\, \mbox{a[m]} ) \\  {\sl byte}\, \mbox{a[$|$m$|$]} ) \\
 &:& \mbox{ --- bignum. The meaning of a[i] will be explained later.}\\  &:& \mbox{ --- bignum. The meaning of a[i] will be explained later.}\\
 \mbox{QQ}        &:& ({\tt CMO\_QQ}, {\sl ZZ}\, {\rm a}, {\sl ZZ}\, {\rm b}) \\  \mbox{QQ}        &:& ({\tt CMO\_QQ},
                         {\sl int32}\, {\rm m}, {\sl byte}\, \mbox{a[1]}, \ldots, {\sl byte}\, \mbox{a[$|$m$|$]},
                         {\sl int32}\, {\rm n}, {\sl byte}\, \mbox{b[1]}, \ldots, {\sl byte}\, \mbox{b[$|$n$|$]})\\
 & & \mbox{ --- Rational number $a/b$. } \\  & & \mbox{ --- Rational number $a/b$. } \\
 \mbox{Rational}        &:& ({\tt CMO\_RATIONAL}, {\sl CMObject}\, {\rm a}, {\sl CMObject}\, {\rm b}) \\  \mbox{Rational}        &:& ({\tt CMO\_RATIONAL}, {\sl CMObject}\, {\rm a}, {\sl CMObject}\, {\rm b}) \\
 & & \mbox{ ---  Rational expression $a/b$. } \\  & & \mbox{ ---  Rational expression $a/b$. } \\
Line 99  ZZ, QQ, Zero, Rational, Indeterminate,$\in$ CMObject/B
Line 103  ZZ, QQ, Zero, Rational, Indeterminate,$\in$ CMObject/B
 */  */
   
 /*&jp  /*&jp
   \subsection{Indeterminate および Tree}
 Indeterminate は変数名をあらわす.  Indeterminate は変数名をあらわす.
 v はバイト列であればなにを用いてもよいが,  v はバイト列であればなにを用いてもよいが,
 システム毎に変数名として用いられるバイト列は制限がある.  システム毎に変数名として用いられるバイト列は制限がある.
Line 110  escape sequence を用いて実現するのは, 無理があるようで
Line 115  escape sequence を用いて実現するのは, 無理があるようで
 テーブルを作成する必要があるであろう.)  テーブルを作成する必要があるであろう.)
 */  */
 /*&eg  /*&eg
   \subsection{Indetermnate and Tree}
 Indeterminate is a name of a variable.  Indeterminate is a name of a variable.
 v may be any sequence of bytes, but each system has its own  v may be any sequence of bytes, but each system has its own
 restrictions on the names of variables.  restrictions on the names of variables.
Line 124  Group CMObject/Tree requires CMObject/Basic. \\
Line 130  Group CMObject/Tree requires CMObject/Basic. \\
 Tree, Lambda $\in$ CMObject/Basic. \\  Tree, Lambda $\in$ CMObject/Basic. \\
 \begin{eqnarray*}  \begin{eqnarray*}
 \mbox{Tree}        &:& ({\tt CMO\_TREE}, {\sl Cstring}\, {\rm name},  \mbox{Tree}        &:& ({\tt CMO\_TREE}, {\sl Cstring}\, {\rm name},
  {\sl Cstring}\, {\rm cdname}, {\sl List}\, {\rm leaves}) \\   {\sl List}\, {\rm attributes}, {\sl List}\, {\rm leaves}) \\
 & & \mbox{ --- 名前 name の定数または関数. 関数の評価はおこなわない. } \\  & & \mbox{ --- 名前 name の定数または関数. 関数の評価はおこなわない. } \\
 & & \mbox{ --- cdname は空文字列でなければ name の意味が説明されている }\\  & & \mbox{ --- attributes は空リストでなければ name の属性を保持している. }\\
 & & \mbox{ --- OpenMath CD (content dictionary) の名前. } \\  & & \mbox{ --- 属性リストは, key と 値のペアである. }\\
 \mbox{Lambda}        &:& ({\tt CMO\_LAMBDA}, {\sl List}\, {\rm args},  \mbox{Lambda}        &:& ({\tt CMO\_LAMBDA}, {\sl List}\, {\rm args},
                           {\sl Tree} {\rm body}) \\                            {\sl Tree} {\rm body}) \\
 & & \mbox{ --- body を args を引数とする関数とする. } \\  & & \mbox{ --- body を args を引数とする関数とする. } \\
Line 141  Group CMObject/Tree requires CMObject/Basic. \\
Line 147  Group CMObject/Tree requires CMObject/Basic. \\
 Tree, Lambda $\in$ CMObject/Basic. \\  Tree, Lambda $\in$ CMObject/Basic. \\
 \begin{eqnarray*}  \begin{eqnarray*}
 \mbox{Tree}        &:& ({\tt CMO\_TREE}, {\sl Cstring}\, {\rm name},  \mbox{Tree}        &:& ({\tt CMO\_TREE}, {\sl Cstring}\, {\rm name},
  {\sl Cstring}\, {\rm cdname}, {\sl List}\, {\rm leaves}) \\   {\sl List}\, {\rm attributes}, {\sl List}\, {\rm leaves}) \\
 & & \mbox{ --- A function or a constant of name. Functions are not evaluated. } \\  & & \mbox{ --- A function or a constant of name. Functions are not evaluated. } \\
 & & \mbox{ --- cdname may be a null. If it is not null, it is the name of}\\  & & \mbox{ --- attributes may be a null list. If it is not null, it is a list of}\\
 & & \mbox{ --- the OpenMath CD (content dictionary). } \\  & & \mbox{ --- key and value pairs. } \\
 \mbox{Lambda}        &:& ({\tt CMO\_LAMBDA}, {\sl List}\, {\rm args},  \mbox{Lambda}        &:& ({\tt CMO\_LAMBDA}, {\sl List}\, {\rm args},
                           {\sl Tree} {\rm body}) \\                            {\sl Tree} {\rm body}) \\
 & & \mbox{ --- a function with the arguments body. } \\  & & \mbox{ --- a function with the arguments body. } \\
Line 185  stack machine commands for delayed evaluation.
Line 191  stack machine commands for delayed evaluation.
 However it makes the implementation of stack machines complicated.  However it makes the implementation of stack machines complicated.
 It is desirable that CMObject is independent of OX stack machine.  It is desirable that CMObject is independent of OX stack machine.
 Therefore we introduce an OpenMath like tree representation for CMO  Therefore we introduce an OpenMath like tree representation for CMO
 tree object.  Tree object.
 This method allows us to implement tree structure easily  This method allows us to implement tree structure easily
 on individual OpenXM systems.  on individual OpenXM systems.
 Note that CMO Tree corresponds to Symbol and Application in OpenMath.  Note that CMO Tree corresponds to Symbol and Application in OpenMath.
Line 208  It is the same as the Lambda expression in Lisp.
Line 214  It is the same as the Lambda expression in Lisp.
 //&jp 例: $sin(x+e)$ の表現.  //&jp 例: $sin(x+e)$ の表現.
 //&eg Example: the expression of $sin(x+e)$.  //&eg Example: the expression of $sin(x+e)$.
 \begin{verbatim}  \begin{verbatim}
 (CMO_TREE, (CMO_STRING, "sin"), (CMO_STRING, "basic"),  (CMO_TREE, (CMO_STRING, "sin"),
       (CMO_LIST,[size=]1,(CMO_LIST,[size=]2,(CMO_STRING, "cdname"),
                                             (CMO_STRING,"basic")))
     (CMO_LIST,[size=]1,      (CMO_LIST,[size=]1,
         (CMO_TREE, (CMO_STRING, "plus"), (CMO_STRING, "basic"),          (CMO_TREE, (CMO_STRING, "plus"), (CMO_STRING, "basic"),
             (CMO_LIST,[size=]2, (CMO_INDETERMINATE,"x"),              (CMO_LIST,[size=]2, (CMO_INDETERMINATE,"x"),
Line 219  It is the same as the Lambda expression in Lisp.
Line 227  It is the same as the Lambda expression in Lisp.
     )      )
 )  )
 \end{verbatim}  \end{verbatim}
   //&jp  Leave の成分には, 多項式を含む任意のオブジェクトがきてよい.
   //&eg  Elements of the leave may be any objects including polynomials.
   
 \noindent  \noindent
 Example:  Example:
 \begin{verbatim}  \begin{verbatim}
 sm1> [(plus) (Basic) [(123).. (345)..]] [(class) (tree)] dc ::  sm1> [(plus) (Basic) [(123).. (345)..]] [(class) (tree)] dc ::
 Class.tree [    $plus$ , $Basic$ , [    123 , 345 ]  ]  Class.tree [    $plus$ , $basic$ , [    123 , 345 ]  ]
 \end{verbatim}  \end{verbatim}
   
   
Line 551  $\in$ CMObject/RecursivePolynomial \\
Line 561  $\in$ CMObject/RecursivePolynomial \\
 \mbox{ Polynomial in 1 variable}\, | \, \mbox{Coefficient}   \\  \mbox{ Polynomial in 1 variable}\, | \, \mbox{Coefficient}   \\
 \mbox{RringDefinition}  \mbox{RringDefinition}
 & : &  \mbox{ {\sl List} v } \\  & : &  \mbox{ {\sl List} v } \\
 & & \quad \mbox{ --- v は, 変数名(indeterminate) のリスト. } \\  & & \quad \mbox{ --- v は, 変数名(indeterminate) または Tree のリスト. } \\
 & & \quad \mbox{ --- 順序の高い順. } \\  & & \quad \mbox{ --- 順序の高い順. } \\
 \end{eqnarray*}  \end{eqnarray*}
 */  */
Line 581  $\in$ CMObject/RecursivePolynomial \\
Line 591  $\in$ CMObject/RecursivePolynomial \\
 \mbox{ Polynomial in 1 variable}\, | \, \mbox{Coefficient}   \\  \mbox{ Polynomial in 1 variable}\, | \, \mbox{Coefficient}   \\
 \mbox{RringDefinition}  \mbox{RringDefinition}
 & : &  \mbox{ {\sl List} v } \\  & : &  \mbox{ {\sl List} v } \\
 & & \quad \mbox{ --- v is a list of names of indeterminates. } \\  & & \quad \mbox{ --- v is a list of names of indeterminates or trees. } \\
 & & \quad \mbox{ --- It is sorted in the decreasing order. } \\  & & \quad \mbox{ --- It is sorted in the decreasing order. } \\
 \end{eqnarray*}  \end{eqnarray*}
 */  */

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.11

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>