changeset 9:9df52fe5b3d7

up
author mir3636
date Sat, 22 Apr 2017 16:44:02 +0900
parents e04e25ad2f3c
children 52b6be8721f8
files paper/sigos.aux paper/sigos.bbl paper/sigos.bib paper/sigos.blg paper/sigos.dvi paper/sigos.log paper/sigos.pdf paper/sigos.tex
diffstat 8 files changed, 141 insertions(+), 157 deletions(-) [+]
line wrap: on
line diff
--- a/paper/sigos.aux	Fri Apr 21 21:23:36 2017 +0900
+++ b/paper/sigos.aux	Sat Apr 22 16:44:02 2017 +0900
@@ -1,28 +1,30 @@
 \relax 
 \citation{cbc}
 \citation{gears}
+\citation{llvm}
 \newlabel{fig:cs}{{1}{2}}
-\newlabel{fig:gearsos}{{2}{2}}
-\newlabel{context}{{1}{2}}
-\@writefile{lol}{\contentsline {lstlisting}{\numberline {1}context}{2}}
+\newlabel{fig:gearsos}{{2}{3}}
+\newlabel{context}{{1}{3}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {1}Context}{3}}
 \newlabel{excbc}{{2}{3}}
-\@writefile{lol}{\contentsline {lstlisting}{\numberline {2}cbccode}{3}}
-\newlabel{interface}{{3}{3}}
-\@writefile{lol}{\contentsline {lstlisting}{\numberline {3}interface}{3}}
-\newlabel{gearef1}{{4}{3}}
-\@writefile{lol}{\contentsline {lstlisting}{\numberline {4}Gearef1}{3}}
-\newlabel{gearef2}{{5}{3}}
-\@writefile{lol}{\contentsline {lstlisting}{\numberline {5}Gearef2}{3}}
-\newlabel{stack_cbc}{{6}{4}}
-\@writefile{lol}{\contentsline {lstlisting}{\numberline {6}exampleCG}{4}}
-\newlabel{stack_c}{{7}{4}}
-\@writefile{lol}{\contentsline {lstlisting}{\numberline {7}stub}{4}}
-\newlabel{init_context}{{8}{4}}
-\@writefile{lol}{\contentsline {lstlisting}{\numberline {8}initcontext}{4}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {2}stack.cbc}{3}}
+\newlabel{interface}{{3}{4}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {3}Interface}{4}}
+\newlabel{gearef1}{{4}{4}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {4}Gearef1}{4}}
+\newlabel{gearef2}{{5}{4}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {5}Gearef2}{4}}
+\newlabel{stack_cbc}{{6}{5}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {6}exampleCG}{5}}
+\newlabel{stack_c}{{7}{5}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {7}stub}{5}}
+\newlabel{fig:gc}{{3}{5}}
+\newlabel{init_context}{{8}{5}}
+\@writefile{lol}{\contentsline {lstlisting}{\numberline {8}init-context}{5}}
 \citation{*}
 \bibstyle{ipsjunsrt}
 \bibdata{sigos}
-\bibcite{gears}{1}
-\bibcite{segment}{2}
-\bibcite{cbc-lola}{3}
-\gdef\ipsj@lastpage{5}
+\bibcite{cbc}{1}
+\bibcite{gears}{2}
+\bibcite{llvm}{3}
+\gdef\ipsj@lastpage{6}
--- a/paper/sigos.bbl	Fri Apr 21 21:23:36 2017 +0900
+++ b/paper/sigos.bbl	Sat Apr 22 16:44:02 2017 +0900
@@ -1,16 +1,15 @@
 \begin{thebibliography}{1}
 
-\bibitem{gears}
-小久保翔平,伊波立樹,河野真治\:Monad に基づくメタ計算を基本とする Gears OS
-  の設計,情報処理学会システムソフトウェアとオペレーティング・システム研究会(OS)
-  (2015).
-
-\bibitem{segment}
-河野真治,杉本 優\:Code Segment と Data Segment
-  によるプログラミング手法,第54回プログラミング・シンポジウム (2013).
-
-\bibitem{cbc-lola}
+\bibitem{cbc}
 TOKKMORI, K. and KONO, S.: Implementing Continuation based language in LLVM and
   Clang, {\em LOLA 2015} (2015).
 
+\bibitem{gears}
+河野真治,伊波立樹,東恩納琢偉\:Code Gear、Data Gear に基づく OS
+  のプロトタイプ,情報処理学会システムソフトウェアとオペレーティング・システム研究会(OS)
+  (2016).
+
+\bibitem{llvm}
+: LLVM documentation.
+
 \end{thebibliography}
--- a/paper/sigos.bib	Fri Apr 21 21:23:36 2017 +0900
+++ b/paper/sigos.bib	Sat Apr 22 16:44:02 2017 +0900
@@ -1,26 +1,25 @@
 @article{
-    segment,
-    author = "河野 真治 and 杉本 優",
-    title = "Code Segment と Data Segment によるプログラミング手法",
-    journal = "第54回プログラミング・シンポジウム",
-    month = "Jan",
-    year = 2013
+    gears,
+    author = "河野 真治 and 伊波 立樹 and  東恩納 琢偉",
+    title = "Code Gear、Data Gear に基づく OS のプロトタイプ",
+    journal = "情報処理学会システムソフトウェアとオペレーティング・システム研究会(OS)",
+    month = "May",
+    year = 2016
 }
 
 @article{
-    gears,
-    author = "小久保 翔平 and 伊波 立樹 and 河野 真治",
-    title = "Monad に基づくメタ計算を基本とする Gears OS の設計",
-    journal = "情報処理学会システムソフトウェアとオペレーティング・システム研究会(OS)",
-    month = "May",
-    year = 2015
-}
-
-@article{
-    cbc-lola,
+    cbc,
     author = "Kaito TOKKMORI and Shinji KONO",
     title = "Implementing Continuation based language in LLVM and Clang",
     journal = "LOLA 2015",
     month = "July",
     year = 2015
 }
+
+@article{
+    llvm,
+    title = "LLVM documentation.",
+    howpublished = "{http://llvm.org/docs/index.html}"
+}
+
+
--- a/paper/sigos.blg	Fri Apr 21 21:23:36 2017 +0900
+++ b/paper/sigos.blg	Sat Apr 22 16:44:02 2017 +0900
@@ -3,53 +3,55 @@
 The top-level auxiliary file: sigos.aux
 The style file: ipsjunsrt.bst
 Database file #1: sigos.bib
-Warning--I didn't find a database entry for "cbc"
+Warning--there's no number and/or volumecbc
+Warning--Missing required argument pages in cbc
 Warning--there's no number and/or volumegears
 Warning--Missing required argument pages in gears
-Warning--there's no number and/or volumesegment
-Warning--Missing required argument pages in segment
-Warning--there's no number and/or volumecbc-lola
-Warning--Missing required argument pages in cbc-lola
+Warning--Missing required argument author in llvm
+Warning--Missing required argument journal in llvm
+Warning--Missing required argument year in llvm
+Warning--there's no number and/or volumellvm
+Warning--Missing required argument pages in llvm
 You've used 3 entries,
             2207 wiz_defined-function locations,
-            547 strings with 4500 characters,
-and the built_in function-call counts, 580 in all, are:
-= -- 30
-> -- 29
+            544 strings with 4427 characters,
+and the built_in function-call counts, 522 in all, are:
+= -- 24
+> -- 21
 < -- 0
-+ -- 10
-- -- 7
-* -- 48
-:= -- 94
++ -- 8
+- -- 5
+* -- 51
+:= -- 81
 add.period$ -- 3
 call.type$ -- 3
 change.case$ -- 0
 chr.to.int$ -- 0
-cite$ -- 9
-duplicate$ -- 39
-empty$ -- 55
-format.name$ -- 10
-if$ -- 127
+cite$ -- 12
+duplicate$ -- 33
+empty$ -- 56
+format.name$ -- 7
+if$ -- 112
 int.to.chr$ -- 0
 int.to.str$ -- 3
 missing$ -- 3
 newline$ -- 12
-num.names$ -- 3
-pop$ -- 9
+num.names$ -- 2
+pop$ -- 11
 preamble$ -- 1
 purify$ -- 0
 quote$ -- 0
-skip$ -- 23
+skip$ -- 19
 stack$ -- 0
 substring$ -- 0
 swap$ -- 1
-text.length$ -- 5
+text.length$ -- 3
 text.prefix$ -- 0
 top$ -- 0
 type$ -- 0
-warning$ -- 6
-while$ -- 3
+warning$ -- 9
+while$ -- 2
 width$ -- 4
-write$ -- 23
-is.kanji.str$ -- 20
-(There were 7 warnings)
+write$ -- 21
+is.kanji.str$ -- 15
+(There were 9 warnings)
Binary file paper/sigos.dvi has changed
--- a/paper/sigos.log	Fri Apr 21 21:23:36 2017 +0900
+++ b/paper/sigos.log	Sat Apr 22 16:44:02 2017 +0900
@@ -1,4 +1,4 @@
-This is e-pTeX, Version 3.14159265-p3.7-160201-2.6 (utf8.euc) (TeX Live 2016) (preloaded format=platex 2017.2.4)  21 APR 2017 19:44
+This is e-pTeX, Version 3.14159265-p3.7-160201-2.6 (utf8.euc) (TeX Live 2016) (preloaded format=platex 2017.2.4)  22 APR 2017 16:43
 entering extended mode
  restricted \write18 enabled.
  %&-line parsing enabled.
@@ -186,76 +186,78 @@
 (Font)              Font shape `JY1/gt/m/n' tried instead on input line 87.
 LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <7> on input line 87.
-LaTeX Font Info:    Font shape `JT1/mc/bx/n' in size <6> not available
-(Font)              Font shape `JT1/gt/m/n' tried instead on input line 113.
-LaTeX Font Info:    Font shape `JY1/mc/bx/n' in size <6> not available
-(Font)              Font shape `JY1/gt/m/n' tried instead on input line 113.
-
-
-LaTeX Warning: Citation `cbc' on page 1 undefined on input line 113.
-
-File: ./pic/codesegment.pdf Graphic file (type pdf)
-<./pic/codesegment.pdf>
-LaTeX Font Info:    Font shape `JT1/mc/bx/n' in size <7> not available
-(Font)              Font shape `JT1/gt/m/n' tried instead on input line 137.
-LaTeX Font Info:    Font shape `JY1/mc/bx/n' in size <7> not available
-(Font)              Font shape `JY1/gt/m/n' tried instead on input line 137.
  [1
 
 
 ]
-File: ./pic/gears_structure.pdf Graphic file (type pdf)
- <./pic/gears_structure.pdf>
-LaTeX Font Info:    Font shape `OT1/cmtt/bx/n' in size <7> not available
-(Font)              Font shape `OT1/cmtt/m/n' tried instead on input line 186.
+File: ./pic/codesegment.pdf Graphic file (type pdf)
+ <./pic/codesegment.pdf>
+LaTeX Font Info:    Font shape `JT1/mc/bx/n' in size <7> not available
+(Font)              Font shape `JT1/gt/m/n' tried instead on input line 177.
+LaTeX Font Info:    Font shape `JY1/mc/bx/n' in size <7> not available
+(Font)              Font shape `JY1/gt/m/n' tried instead on input line 177.
  [2]
-Overfull \hbox (66.99287pt too wide) in paragraph at lines 186--186
-[]\OT1/cmr/m/n/9 context 
- []
+File: ./pic/gears_structure.pdf Graphic file (type pdf)
 
+<./pic/gears_structure.pdf>
+LaTeX Font Info:    Font shape `OT1/cmtt/bx/n' in size <7> not available
+(Font)              Font shape `OT1/cmtt/m/n' tried instead on input line 226.
 
-Overfull \hbox (69.04842pt too wide) in paragraph at lines 207--207
-[]\OT1/cmr/m/n/9 cbccode 
+Overfull \hbox (69.5623pt too wide) in paragraph at lines 226--226
+[]\OT1/cmr/m/n/9 Context 
  []
 
 
-Overfull \hbox (71.64214pt too wide) in paragraph at lines 245--245
-[]\OT1/cmr/m/n/9 interface 
+Overfull \hbox (73.97826pt too wide) in paragraph at lines 245--245
+[]\OT1/cmr/m/n/9 stack.cbc 
+ []
+
+[3]
+Overfull \hbox (72.41156pt too wide) in paragraph at lines 262--262
+[]\OT1/cmr/m/n/9 Interface 
  []
 
 
-Overfull \hbox (68.36577pt too wide) in paragraph at lines 261--261
+Overfull \hbox (68.36577pt too wide) in paragraph at lines 274--274
 []\OT1/cmr/m/n/9 Gearef1 
  []
 
-[3]
-Overfull \hbox (68.36577pt too wide) in paragraph at lines 262--262
+
+Overfull \hbox (68.36577pt too wide) in paragraph at lines 275--275
 []\OT1/cmr/m/n/9 Gearef2 
  []
 
-
-Overfull \hbox (84.27539pt too wide) in paragraph at lines 285--285
+[4]
+Overfull \hbox (84.27539pt too wide) in paragraph at lines 298--298
 []\OT1/cmr/m/n/9 exampleCG 
  []
 
 
-Overfull \hbox (54.70755pt too wide) in paragraph at lines 286--286
+Overfull \hbox (54.70755pt too wide) in paragraph at lines 299--299
 []\OT1/cmr/m/n/9 stub 
  []
 
-[4]
-Overfull \hbox (80.86778pt too wide) in paragraph at lines 306--306
-[]\OT1/cmr/m/n/9 initcontext 
+File: ./pic/generate_context3.pdf Graphic file (type pdf)
+<./pic/generate_context3.pdf>
+Overfull \hbox (54.14227pt too wide) in paragraph at lines 329--329
+[]\OT1/cmr/m/n/9 init-
+ []
+
+
+Overfull \hbox (66.99287pt too wide) in paragraph at lines 329--329
+\OT1/cmr/m/n/9 context 
  []
 
-(./sigos.bbl) [5] (./sigos.aux) ) 
+[5] (./sigos.bbl) [6
+
+] (./sigos.aux) ) 
 Here is how much of TeX's memory you used:
- 3187 strings out of 493683
- 43727 string characters out of 6149654
- 325711 words of memory out of 5000000
- 6739 multiletter control sequences out of 15000+600000
- 18451 words of font info for 72 fonts, out of 8000000 for 9000
+ 3182 strings out of 493683
+ 43735 string characters out of 6149654
+ 327711 words of memory out of 5000000
+ 6736 multiletter control sequences out of 15000+600000
+ 17676 words of font info for 69 fonts, out of 8000000 for 9000
  929 hyphenation exceptions out of 8191
- 30i,10n,49p,213b,1628s stack positions out of 5000i,500n,10000p,200000b,80000s
+ 30i,10n,49p,213b,1484s stack positions out of 5000i,500n,10000p,200000b,80000s
 
-Output written on sigos.dvi (5 pages, 47512 bytes).
+Output written on sigos.dvi (6 pages, 53576 bytes).
Binary file paper/sigos.pdf has changed
--- a/paper/sigos.tex	Fri Apr 21 21:23:36 2017 +0900
+++ b/paper/sigos.tex	Sat Apr 22 16:44:02 2017 +0900
@@ -128,7 +128,7 @@
 CbC での記述はメタ計算を含まないノーマルレベルでの記述と、 Code Gear、Data Gear の記述を含むメタレベルの記述の2種類がある。
 メタレベルでもさらに、メタ計算を用いることが可能になっている。
 この2つのレベルはプログラミング言語レベルでの変換として実現される。
-CbC は LLVM 上で実装されており、メタレベルでの変換系は本論文では、Perl による変換スクリプトにより実装されている。
+CbC は LLVM\cite{llvm} 上で実装されており、メタレベルでの変換系は本論文では、Perl による変換スクリプトにより実装されている。
 
 Code Gear と Data Gear は Interface と呼ばれるまとまりとして記述される。
 Interface は使用される Data Gear の定義と、それに対する操作を行う Code Gear の集合である。
@@ -223,7 +223,7 @@
 Gears OS には Context と呼ばれる接続可能な Code Gear、Data Gear のリスト、Temporal Data Gear のためのメモリ空間等を持っている Meta Data Gear を持つ。
 Gears OSは必要なCode Gear、Data Gearに参照したい場合、このContext を通す必要がある。
 
-\lstinputlisting[label=context, caption=context]{./src/context1.c}
+\lstinputlisting[label=context, caption=Context]{./src/context1.c}
 
 Data Gear は union と struct によって表現される。
 Context には Data Gear の Data Type の情報が格納されている。
@@ -234,62 +234,35 @@
 Gears OS における Task Queue は Synchronized Queue で実現される。 
 Worker は TaskQueue から Task である Context を取得し、 Input/Output Data Gear の依存関係が解決されたものから並列実行される。
 
-
-
 \section{CbC のコードの例}
 
-リスト\ref{excbc}は CbC で記述された stack のコードの一部である。
+Code\ref{excbc}は CbC で記述された stack のコードの一部である。
 Code Gear は \_\_code Code Gear で始まり、次の Code Gear へ goto で遷移する。
 
 %,,,の説明
 %codegearの説明もっとする?
 
-\lstinputlisting[label=excbc, caption=cbccode]{./src/ex_stack.cbc}
+\lstinputlisting[label=excbc, caption=stack.cbc]{./src/ex_stack.cbc}
 
 \section{CbC による Gears OS 記述の問題}
 
-
-
 %メタの話
 Gears OS を CbC で実装する上でメタ計算の記述が煩雑であることがわかった。
 これらのメタ計算を自動生成することにより Gears OS を記述する上においてより良い構文をユーザーに提供することにした。
 
-
-
 \section{interface の記述}
-% union data はジェネラルなデータセグメントこれには
-% goto のひきすうとしてつかう フレームを表している
-%関数呼び出しのabi
-%ひきすうで呼び出されるcg ひきすうはぜんぶ定義されていなければならない
-%メタデータセグメント
-%名前付きの変数が現れる
-%書き込みは**読み込みは*
-%いんたーふぇーすなので実装がいる
-
- 
-
- 
-
-
-
 interface は呼び出しの引数になる Data Gear の集合であり、そこで呼び出される Code Gear のエントリである。
 呼び出される Code Gear の引数となる Data Gear はここで全て定義される。
 
-
-
 Code Gear、Data Gear に参照するために Context を通す必要があるが、
 interface を記述することでデータ構造のapiと Data Gear を結びつけることが出来、呼び出しが容易になった。
 %create は関数呼び出しで呼び出され、interface と impliment の初期化と Code Gear のポインタの設定を行う。
 %return で interface を返し、その先で Code Gear や Data Gear へ継続できるようになる。
 
-\lstinputlisting[label=interface, caption=interface]{./src/Stack.cbc}
+\lstinputlisting[label=interface, caption=Interface]{./src/Stack.cbc}
 
 \section{Gearef、GearImpl}
 
-
-
-
-
 Context には Allocation 等で生成した Data Gear へのポインタが格納されている。
 Code Gear が Context にアクセスする際、ポインタを使用してデータを取り出すため、リスト\ref{gearef1} のようにコードが煩雑になってしまう。
 そこで Code Gear がデータを参照するための Gearef というマクロを定義した。
@@ -309,7 +282,7 @@
 \section{Context、stub Code Segment の自動生成}
 
 Gears OS では 通常の計算の他に Context や stub などのメタ計算を記述する必要があが、Gears OS を現在の CbC の機能のみを用いて記述するとこのメタ計算の記述を行わなくてはならず、これには多くの労力を要する。
-この記述を助けるために Context を生成する generate\_context と stub Code Gear を生成する generate\_stub を perl スクリプトで作成した。
+この記述を助けるために Context を生成する generate\_context と stub Code Gear を生成する generate\_stub を Perl スクリプトで作成した。
 
 \section{stub Code Segment の生成}
 stub Code Gear は Code Gear 間の継続に挟まれる Code Gear が必要な Data Gear を Context から取り出す処理を行うものである。
@@ -326,8 +299,18 @@
 \lstinputlisting[label=stack_c, caption=stub]{./src/ex_stub}
 
 \section{Context の生成}
+generate\_context は Context.h、Interface.cbc、generate\_stub で生成されたImpl.cbc を見て Context を生成する。
+
+\begin{figure}[ht]
+ \begin{center}
+  \includegraphics[width=70mm]{./pic/generate_context3.pdf}
+ \end{center}
+ \caption{generate\_context による Context の生成}
+ \label{fig:gc}
+\end{figure}
+
 Context は Meta Data Gear に相当し、Code Gear や Data Gear を管理している。
-Data Gear を取得するために generate context は context の定義 (Code\ref{context}) を読み宣言されている Data Gear を取得する。
+Data Gear を取得するために generate\_context は context の定義 (Code\ref{context}) を読み宣言されている Data Gear を取得する。
 
 Code Gear の取得は指定された generate\_stub で生成されたコードから \_\_code 型を見て行う。
 取得した Code Gear、Data Gear の enum の定義は enumCode.h、enumData.h に生成される。
@@ -343,18 +326,15 @@
 Context には Data Gear の Data Type の情報が格納されている。
 この情報から確保される Data Gear のサイズなどを決定する。
 
-\lstinputlisting[label=init_context, caption=initcontext]{./src/context2.c}
+\lstinputlisting[label=init_context, caption=init-context]{./src/context2.c}
 
 \section{今後の課題}
-本研究では LLVM/Clang のデバッグ、interface の記述、CbC ファイルから Gears OS の記述に必要な Context と stub の生成を行う perl スクリプトの生成を行なった。
+本研究では LLVM/Clang のデバッグ、interface の記述、CbC ファイルから Gears OS の記述に必要な Context と stub の生成を行う Perl スクリプトの生成を行なった。
 これにより Gears OS のコードの煩雑さは改善され、ユーザーは Context への接続を意識する必要がなくなった。
 
-%しかし、現在のスクリプトでは stub 
+今後の課題は Code Gear からメタ計算を行う meta Code Gear を生成できるようにし、ユーザーがメタレベルの処理を意識せずにコードを記述できるようにする。
+また、今回 Perl スクリプトによって Context や stub の生成を行なったが、LLVM/clang 上で実装しコンパイラで直接 CbC を実行できるようにすることを目的とする。
 
-今後の課題は Code Gear からメタ計算を行う meta Code Gear を生成できるようにし、ユーザーがメタレベルの処理を意識せずにコードを記述できるようにする。
-また、今回 perl スクリプトによって Context や stub の生成を行なったが、LLVM/clang 上で実装しコンパイラで直接 CbC を実行できるようにすることを目的とする。
-
-% めたけいさんをどこに挟むかというのをかく 上
 
 %\begin{figure}[ht]
 %    \begin{center}