comparison final_pre/finalPre.tex @ 19:aed360eb1146

update
author mir3636
date Thu, 16 Feb 2017 02:14:33 +0900
parents 11058e51adb7
children 876ee5de1088
comparison
equal deleted inserted replaced
18:981020cb97ae 19:aed360eb1146
27 \author{135756F 氏名 {宮城}{光希} 指導教員 : 河野 真治} 27 \author{135756F 氏名 {宮城}{光希} 指導教員 : 河野 真治}
28 \date{} 28 \date{}
29 \twocolumn [ 29 \twocolumn [
30 \maketitle 30 \maketitle
31 \begin{onecolabstract} 31 \begin{onecolabstract}
32 We are developping Gears OS using Continuation based C (CbC). 32 We are developing Gears OS using Continuation based C (CbC).
33 Gears OS provids highly reliable computation using meta computation. 33 Gears OS provides highly reliable computation using meta computation.
34 CbC gives Code Gear and Data Gear as programing units. 34 CbC gives Code Gear and Data Gear as programing units.
35 A transfar from a Code Gear to another Code Gear is implemented using a CbC's goto statement, 35 A transfer from a Code Gear to another Code Gear is implemented using a CbC's goto statement,
36 which is compiled as a jump instraction in CbC. 36 which is compiled as a jump instruction in CbC.
37 Meta computations are key components of Gears OS, which provids memory managements, thread managements, 37 Meta computations are key components of Gears OS, which provides memory managements, thread managements,
38 managements of Data/Code Gear themselves. 38 managements of Data/Code Gear themselves.
39 CbC's goto statments provids a ways of implementing meta computations. 39 CbC's goto statements provides a ways of implementing meta computations.
40 From a view point of meta computation, Data Gear or Code Gear are uniform data units, which are implemented 40 From a view point of meta computation, Data Gear or Code Gear are uniform data units, which are implemented
41 as union Data in CbC. 41 as union Data in CbC.
42 In the meta level, a transfar from a Code Gear is a goto statement to meta Code Gear with next Code Gear number and 42 In the meta level, a transfer from a Code Gear is a goto statement to meta Code Gear with next Code Gear number and
43 a Context which coresponds thread structure or an enviroments in a functional programing. 43 a Context which corresponds thread structure or an environments in a functional programing.
44 A meta Code Gear handles meta computations such as meta computations. 44 A meta Code Gear handles meta computations such as meta computations.
45 From a nomal level, meta structures are not visible directly and a Code Gear looks like a function using continuations. 45 From a normal level, meta structures are not visible directly and a Code Gear looks like a function using continuations.
46 A stub Code Gear is used as a bridge between meta level and nomal level. 46 A stub Code Gear is used as a bridge between meta level and normal level.
47 In this paper we create scripts which generate meta Code Gear and stub Code Gear from nomal level Code Gear and Data Gear. 47 In this paper we create scripts which generate meta Code Gear and stub Code Gear from normal level Code Gear and Data Gear.
48 Using these scripts, we can provide a interface mechanisms which are packages of Code Gears and Data Gears. 48 Using these scripts, we can provide a interface mechanisms which are packages of Code Gears and Data Gears.
49 A simple TaskManager is constracted using the interfaces which is a simple operating systems. 49 A simple task manager is constructed using the interfaces which is a simple operating systems.
50 We will constracts various compornents of Gears OS and meta computations which provids reliabilty. 50 We will constructs various components of Gears OS and meta computations which provides reliability.
51 For an example, generating agda program from nomal level Code Gear provids proof suports of the Code Gear. 51 For an example, generating agda program from normal level Code Gear provides proof supports of the Code Gear.
52 %CbC で OS を記述する。 52 %CbC で OS を記述する。
53 %CbCはLLVMで実装されている。 53 %CbCはLLVMで実装されている。
54 %codeとcode のあいだをcall ではなくjmpで結ぶことができる(goto) 54 %codeとcode のあいだをcall ではなくjmpで結ぶことができる(goto)
55 %gotoをつかうことによりOSに必須なmeta計算を実現できる 55 %gotoをつかうことによりOSに必須なmeta計算を実現できる
56 %メタ計算は例えばメモリ管理スレッド管理CPUやGPUの資源管理そしてData/Code Gear の管理などである 56 %メタ計算は例えばメモリ管理スレッド管理CPUやGPUの資源管理そしてData/Code Gear の管理などである
78 そこで当研究室では Meta Computation を柔軟に記述するためのプログラミング言語の単位として Code Gear、Data Gear という単位を提案している。 78 そこで当研究室では Meta Computation を柔軟に記述するためのプログラミング言語の単位として Code Gear、Data Gear という単位を提案している。
79 79
80 Code Gear は関数に比べて細かく分割されているので Meta Computation をより柔軟に記述できる。 80 Code Gear は関数に比べて細かく分割されているので Meta Computation をより柔軟に記述できる。
81 Code Gear、Data Gear にはそれぞれメタレベルの単位である Meta Code Gear、Meta Data Gear が存在し、これらを用いて Meta Computation を実現する。 81 Code Gear、Data Gear にはそれぞれメタレベルの単位である Meta Code Gear、Meta Data Gear が存在し、これらを用いて Meta Computation を実現する。
82 82
83 Continuation based C (CbC) はこの Code Gear 単位を用いたプログラミング言語として開発している。 83 Continuation based C (CbC)\cite{kaito:2015} はこの Code Gear 単位を用いたプログラミング言語として開発している。
84 84
85 CbCは軽量継続による遷移を行うので、継続前の Code Gear に戻ることはなく、状態遷移ベースのプログラミングに適している。 85 CbCは軽量継続による遷移を行うので、継続前の Code Gear に戻ることはなく、状態遷移ベースのプログラミングに適している。
86 86
87 また、当研究室で開発している Gears OS は Code Gear、 Data Gear の単位を用いて開発されており、CbC で記述されている。 87 また、当研究室で開発している Gears OS\cite{gears} は Code Gear、 Data Gear の単位を用いて開発されており、CbC で記述されている。
88 88
89 本研究では CbC を用いての Gears OS の実装と CbC における ユーザーの関知しない Meta Computationの自動生成を行なう。 89 本研究では CbC を用いての Gears OS の実装と CbC における ユーザーの関知しない Meta Computationの自動生成を行なう。
90 90
91 %\begin{figure}[htbp] 91 %\begin{figure}[htbp]
92 % \begin{center} 92 % \begin{center}
95 % \caption{構成される木構造} 95 % \caption{構成される木構造}
96 % \label{fig:tree} 96 % \label{fig:tree}
97 %\end{figure} 97 %\end{figure}
98 98
99 \section{Continuation based C (CbC)} 99 \section{Continuation based C (CbC)}
100 CbC は 処理を Code Gear とした単位を用いて記述するプログラミング言語である。 100 CbC は 処理を Code Gear とした単位を用いて記述するプログラミング言語\cite{kaito:2015}である。
101 Code Gear は入力と出力を持ち、CbC では引数が入出力となっている。 101 Code Gear は入力と出力を持ち、CbC では引数が入出力となっている。
102 Code Gear から次の Code Gear へと goto による継続で遷移で処理を行い、引数として出力を与える。 102 Code Gear から次の Code Gear へと goto による継続で遷移で処理を行い、引数として出力を与える。
103 図\ref{fig:cs}は Code Gear 間の処理の流れを表している。 103 図\ref{fig:cs}は Code Gear 間の処理の流れを表している。
104 104
105 \begin{figure}[htpb] 105 \begin{figure}[htpb]
163 \section{Context, stub の自動生成} 163 \section{Context, stub の自動生成}
164 Gears OS では通常の Computation の他に Context や stub などの Meta Computation を記述する必要がある。 164 Gears OS では通常の Computation の他に Context や stub などの Meta Computation を記述する必要がある。
165 Gears OS を現在の CbC の機能のみを用いて記述すると Context や stub Code Gear の記述を行わなくてはならず、これには多くの労力を要する。 165 Gears OS を現在の CbC の機能のみを用いて記述すると Context や stub Code Gear の記述を行わなくてはならず、これには多くの労力を要する。
166 そのため、この記述を助けるために Context を生成する generate\_context と stub Code Gear を生成する generate\_stub を perl スクリプトで作成した。 166 そのため、この記述を助けるために Context を生成する generate\_context と stub Code Gear を生成する generate\_stub を perl スクリプトで作成した。
167 167
168 \section{まとめ} 168 \section{今後の課題}
169 169 本研究では interface の記述、CbC ファイルから Gears OS の記述に必要な Context と stub の生成を行う perlスクリプトの生成を行なった。
170 170 これにより Gears OS のコードの煩雑さは改善され、ユーザーは Context への接続を意識する必要がなくなった。
171 今後の課題は Code Gear から meta computation を行う meta Code Gear を生成できるようにし、ユーザーがメタレベルの処理を意識せずにコードを記述できるようにする。
172 また、今回 perl スクリプトによって Context や stub の生成を行なったが、LLVM/clang\cite{llvm} 上で実装しコンパイラで直接 CbC を実行できるようにすることも優先する。
171 173
172 \nocite{*} 174 \nocite{*}
173 \bibliographystyle{junsrt} 175 \bibliographystyle{junsrt}
174 \bibliography{reference} 176 \bibliography{reference}
175 \end{document} 177 \end{document}