changeset 22:97f70e469150

add svg
author mir3636
date Thu, 16 Feb 2017 07:14:40 +0900
parents 151e3fd72185
children c8bfa1f18b9e
files final_main/chapter3.tex final_main/chapter5.tex presen/fig/generate_context.svg presen/slide.html presen/slide.md
diffstat 5 files changed, 487 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/final_main/chapter3.tex	Thu Feb 16 02:22:53 2017 +0900
+++ b/final_main/chapter3.tex	Thu Feb 16 07:14:40 2017 +0900
@@ -82,7 +82,7 @@
 Code Gear が Context にアクセスする際、ポインタを使用してデータを取り出すためコードが煩雑になってしまう(リスト\ref{ref})。
 そこで Code Gear がデータを参照するための Gearef というマクロを定義した。
 Gearef に Context と型を渡すことでデータの参照が行える。
-また impliment を参照する際も、ポインタでの記述が複雑になってしまうため 同様に GearImpl を定義した。
+また impliment のデータを参照する際も、ポインタでの記述が複雑になってしまうため 同様に GearImpl を定義した。
 GearImpl は Context と interface 名、interface の変数名を指定して参照する。
 Gearef と GearImpl を用いたコードがリスト\ref{Gearef}である。
 
--- a/final_main/chapter5.tex	Thu Feb 16 02:22:53 2017 +0900
+++ b/final_main/chapter5.tex	Thu Feb 16 07:14:40 2017 +0900
@@ -1,8 +1,8 @@
 \chapter{Context、stub Code Segment の自動生成}
 
 Gears OS では 3 章で述べたように通常の Computation の他に Context や stub などの Meta Computation を記述する必要がある。
-Gears OS を現在の CbC の機能のみを用いて記述すると Context や stub Code Gear の記述を行わなくてはならず、これには多くの労力を要する。
-そのため、この記述を助けるために Context を生成する generate\_context と stub Code Gear を生成する generate\_stub を perl スクリプトで作成した。
+Gears OS を現在の CbC の機能のみを用いて記述するとこの Meta Computation の記述を行わなくてはならず、これには多くの労力を要する。
+この記述を助けるために Context を生成する generate\_context と stub Code Gear を生成する generate\_stub を perl スクリプトで作成した。
 
 \section{stub Code Segment の生成}
 stub Code Gear は Code Gear 間の継続に挟まれる Code Gear が必要な Data Gear を Context から取り出す処理を行うものである。
@@ -196,11 +196,11 @@
 
 \end{lstlisting}
 
-Code Gear の取得は指定された cbc ファイルから \_\_code 型を見て行う。
+Code Gear の取得は指定された c ファイルから \_\_code 型を見て行う。
 取得した Code/Data Gear の enum の定義は enumCode.h、enumData.h に生成される。
 
-Context では Code Gear の名前とポインタの対応は generate\_context によって生成される enum Code と関数ポインタによって表現される。
-実際に Code Gear に接続する際は enum Code を指定することで接続を行う。
+Code/Data Gear の名前とポインタの対応は generate\_context によって生成される enum Code、enum Data と関数ポインタによって表現される。
+実際に Code/Data Gear に接続する際は enum Code、enum Data を指定することで接続を行う。
 
 また、generate\_context は取得した Code/Data Gear から Context の生成を行うコード (リスト\ref{init_context}) も生成する。
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/presen/fig/generate_context.svg	Thu Feb 16 07:14:40 2017 +0900
@@ -0,0 +1,328 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   viewBox="0 0 837.5 532.5"
+   height="532.5"
+   width="837.5"
+   xml:space="preserve"
+   version="1.1"
+   id="svg2"><metadata
+     id="metadata8"><rdf:RDF><cc:Work
+         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+     id="defs6"><clipPath
+       id="clipPath18"
+       clipPathUnits="userSpaceOnUse"><path
+         id="path20"
+         d="M 0,0 670,0 670,426 0,426 0,0 Z" /></clipPath></defs><g
+     transform="matrix(1.25,0,0,-1.25,0,532.5)"
+     id="g10"><g
+       id="g12" /><g
+       id="g14"><g
+         clip-path="url(#clipPath18)"
+         id="g16"><path
+           id="path22"
+           style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+           d="m -16,425 856,0 0,-739 -856,0 0,739 z" /><path
+           id="path24"
+           style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+           d="m 11,299 117,0 0,-36 -117,0 0,36 z" /><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g26"><path
+             id="path28"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 27,126 117,0 0,36 -117,0 0,-36 z" /></g><g
+           transform="matrix(1,0,0,-1,69.5,281)"
+           id="g30"><text
+             id="text32"
+             style="font-variant:normal;font-weight:normal;font-size:12px;font-family:Helvetica;-inkscape-font-specification:Helvetica;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             transform="translate(-14.50781,4)"><tspan
+               id="tspan34"
+               y="0"
+               x="0 7.0079999 10.3416 16.3416 23.016001">~.cbc</tspan></text>
+</g><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g36"><path
+             id="path38"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 359.9368,151.4437 c 26.751,8.5915 26.751,22.5211 0,31.1126 -26.7509,8.5916 -70.1227,8.5916 -96.8736,0 -26.751,-8.5915 -26.751,-22.5211 0,-31.1126 26.7509,-8.5916 70.1227,-8.5916 96.8736,0" /></g><g
+           transform="matrix(1,0,0,-1,295.5,258)"
+           id="g40"><text
+             id="text42"
+             style="font-variant:normal;font-weight:normal;font-size:12px;font-family:Helvetica;-inkscape-font-specification:Helvetica;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             transform="translate(-38.36426,4)"><tspan
+               id="tspan44"
+               y="0"
+               x="0 6.6743999 13.3488 20.023199 26.697599 30.6936 37.368 40.701599 47.375999 54.0504 60.0504 63.383999 70.058403">generate_stub</tspan></text>
+</g><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g46"><path
+             id="path48"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 144.4954,144.068 93.6997,12.8663" /></g><path
+           id="path50"
+           style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+           d="m 230.1207,266.9775 -7.5175,4.0604 -0.8162,-5.9443 8.3337,1.8839 z" /><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g52"><path
+             id="path54"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 246.1207,158.0225 -7.5175,-4.0604 -0.8162,5.9443 8.3337,-1.8839 z" /></g><path
+           id="path56"
+           style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+           d="m 497,374.2028 162,0 L 659,11 l -162,0 0,363.2028 z" /><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g58"><path
+             id="path60"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 513,50.79715 162,0 L 675,414 513,414 513,50.79715 Z" /></g><g
+           transform="matrix(1,0,0,-1,576.3333,395.1014)"
+           id="g62"><text
+             id="text64"
+             style="font-variant:normal;font-weight:normal;font-size:15px;font-family:HelveticaNeue;-inkscape-font-specification:HelveticaNeue;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             transform="translate(-4.0275,5.290001)"><tspan
+               id="tspan66"
+               y="0"
+               x="0">c</tspan></text>
+</g><path
+           id="path68"
+           style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+           d="m 524,344 108,0 0,-36 -108,0 0,36 z" /><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g70"><path
+             id="path72"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 540,81 108,0 0,36 -108,0 0,-36 z" /></g><g
+           transform="matrix(1,0,0,-1,578,326)"
+           id="g74"><text
+             id="text76"
+             style="font-variant:normal;font-weight:normal;font-size:12px;font-family:Helvetica;-inkscape-font-specification:Helvetica;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             transform="translate(-8.170898,4)"><tspan
+               id="tspan78"
+               y="0"
+               x="0 7.0079999 10.3416">~.c</tspan></text>
+</g><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g80"><path
+             id="path82"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="M 362.2257,151.9044 530.032,101.9664" /></g><path
+           id="path84"
+           style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+           d="m 521.6997,325.3154 -8.5234,0.5936 1.7114,-5.7508 6.812,5.1572 z" /><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g86"><path
+             id="path88"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 537.6997,99.68455 -8.5234,-0.59353 1.7114,5.75078 6.812,-5.15725 z" /></g><path
+           id="path90"
+           style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+           d="m 11,182 117,0 0,-36 -117,0 0,36 z" /><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g92"><path
+             id="path94"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 27,243 117,0 0,36 -117,0 0,-36 z" /></g><g
+           transform="matrix(1,0,0,-1,69.5,164)"
+           id="g96"><text
+             id="text98"
+             style="font-variant:normal;font-weight:normal;font-size:12px;font-family:Helvetica;-inkscape-font-specification:Helvetica;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             transform="translate(-24.34863,4)"><tspan
+               id="tspan100"
+               y="0"
+               x="0 6 12.6744 19.348801 22.6824 29.3568 35.3568 38.690399 42.023998">context.h</tspan></text>
+</g><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g102"><path
+             id="path104"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 359.9368,249.5901 c 26.751,8.7868 26.751,23.033 0,31.8198 -26.7509,8.7868 -70.1227,8.7868 -96.8736,0 -26.751,-8.7868 -26.751,-23.033 0,-31.8198 26.7509,-8.7868 70.1227,-8.7868 96.8736,0" /></g><g
+           transform="matrix(1,0,0,-1,295.5,159.5)"
+           id="g106"><text
+             id="text108"
+             style="font-variant:normal;font-weight:normal;font-size:12px;font-family:Helvetica;-inkscape-font-specification:Helvetica;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             transform="translate(-46.36816,4)"><tspan
+               id="tspan110"
+               y="0"
+               x="0 6.6743999 13.3488 20.023199 26.697599 30.6936 37.368 40.701599 47.375999 54.0504 60.0504 66.7248 73.3992 76.732803 83.407204 89.407204">generate_context</tspan></text>
+</g><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g112"><path
+             id="path114"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="M 540,99 348.0633,238.8576" /></g><path
+           id="path116"
+           style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+           d="m 325.5977,181.4312 8.2324,2.2866 -3.5335,4.8492 -4.6989,-7.1358 z" /><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g118"><path
+             id="path120"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 341.5977,243.5688 8.2324,-2.2866 -3.5335,-4.8492 -4.6989,7.1358 z" /></g><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g122"><path
+             id="path124"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 144.4998,261.0134 88.3305,2.3731" /></g><path
+           id="path126"
+           style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+           d="m 224.8274,161.3987 -7.9165,3.2137 -0.1612,-5.9978 8.0777,2.7841 z" /><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g128"><path
+             id="path130"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 240.8274,263.6013 -7.9165,-3.2137 -0.1612,5.9978 8.0777,-2.7841 z" /></g><path
+           id="path132"
+           style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+           d="m 524,290 108,0 0,-36 -108,0 0,36 z" /><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g134"><path
+             id="path136"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 540,135 108,0 0,36 -108,0 0,-36 z" /></g><g
+           transform="matrix(1,0,0,-1,578,272)"
+           id="g138"><text
+             id="text140"
+             style="font-variant:normal;font-weight:normal;font-size:12px;font-family:Helvetica;-inkscape-font-specification:Helvetica;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             transform="translate(-34.35645,4)"><tspan
+               id="tspan142"
+               y="0"
+               x="0 6.6743999 13.3488 20.023199 30.019199 38.6856 45.360001 52.034401 58.708801 62.0424">enumCode.h</tspan></text>
+</g><path
+           id="path144"
+           style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+           d="m 524,236 108,0 0,-36 -108,0 0,36 z" /><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g146"><path
+             id="path148"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 540,189 108,0 0,36 -108,0 0,-36 z" /></g><g
+           transform="matrix(1,0,0,-1,578,218)"
+           id="g150"><text
+             id="text152"
+             style="font-variant:normal;font-weight:normal;font-size:12px;font-family:Helvetica;-inkscape-font-specification:Helvetica;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             transform="translate(-32.68652,4)"><tspan
+               id="tspan154"
+               y="0"
+               x="0 6.6743999 13.3488 20.023199 30.019199 38.6856 45.360001 48.6936 55.368 58.701599">enumData.h</tspan></text>
+</g><path
+           id="path156"
+           style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+           d="m 524,182 108,0 0,-36 -108,0 0,36 z" /><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g158"><path
+             id="path160"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 540,243 108,0 0,36 -108,0 0,-36 z" /></g><g
+           transform="matrix(1,0,0,-1,578,164)"
+           id="g162"><text
+             id="text164"
+             style="font-variant:normal;font-weight:normal;font-size:12px;font-family:Helvetica;-inkscape-font-specification:Helvetica;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             transform="translate(-38.02441,4)"><tspan
+               id="tspan166"
+               y="0"
+               x="0 6.6743999 13.3488 16.6824 23.3568 32.690399 39.364799 46.0392 50.035198 53.368801 60.043201 62.709599 66.043198 69.376801">dataGearInit.h</tspan></text>
+</g><path
+           id="path168"
+           style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+           d="m 524,128 108,0 0,-36 -108,0 0,36 z" /><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g170"><path
+             id="path172"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 540,297 108,0 0,36 -108,0 0,-36 z" /></g><g
+           transform="matrix(1,0,0,-1,578,110)"
+           id="g174"><text
+             id="text176"
+             style="font-variant:normal;font-weight:normal;font-size:12px;font-family:Helvetica;-inkscape-font-specification:Helvetica;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             transform="translate(-39.0293,4)"><tspan
+               id="tspan178"
+               y="0"
+               x="0 6.6743999 12.6744 19.348801 26.023199 32.697601 39.372002 42.705601 51.372002 58.046398 61.380001 68.054398 71.388">TypedefData.h</tspan></text>
+</g><path
+           id="path180"
+           style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+           d="m 524,74 108,0 0,-36 -108,0 0,36 z" /><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g182"><path
+             id="path184"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 540,351 108,0 0,36 -108,0 0,-36 z" /></g><g
+           transform="matrix(1,0,0,-1,578,56)"
+           id="g186"><text
+             id="text188"
+             style="font-variant:normal;font-weight:normal;font-size:12px;font-family:Helvetica;-inkscape-font-specification:Helvetica;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+             transform="translate(-41.35254,4)"><tspan
+               id="tspan190"
+               y="0"
+               x="0 3.3336 10.008 14.004 20.6784 27.3528 30.686399 34.6824 40.6824 47.3568 54.0312 57.364799 64.0392 70.0392 73.372803 76.706398">target-context.c</tspan></text>
+</g><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g192"><path
+             id="path194"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="M 349.972,246.5586 531.1181,157.3729" /></g><path
+           id="path196"
+           style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+           d="m 522.2954,271.1608 -8.5024,-0.8422 2.6503,-5.383 5.8521,6.2252 z" /><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g198"><path
+             id="path200"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 538.2954,153.8392 -8.5024,0.8422 2.6503,5.383 5.8521,-6.2252 z" /></g><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g202"><path
+             id="path204"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="M 366.0172,251.5426 530.4093,209.4554" /></g><path
+           id="path206"
+           style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+           d="m 522.1594,217.5288 -8.4941,0.9221 1.4881,-5.8125 7.006,4.8904 z" /><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g208"><path
+             id="path210"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 538.1594,207.4712 -8.4941,-0.9221 1.4881,5.8125 7.006,-4.8904 z" /></g><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g212"><path
+             id="path214"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="M 380.3779,264.1435 529.602,261.2048" /></g><path
+           id="path216"
+           style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+           d="m 521.6005,163.9527 -8.0576,2.8419 0.1182,-5.9988 7.9394,3.1569 z" /><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g218"><path
+             id="path220"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 537.6005,261.0473 -8.0576,-2.8419 0.1182,5.9988 7.9394,-3.1569 z" /></g><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g222"><path
+             id="path224"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="M 369.1833,277.9959 530.3244,312.904" /></g><path
+           id="path226"
+           style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+           d="m 522.1431,110.4023 -7.1835,4.6257 -1.2703,-5.864 8.4538,1.2383 z" /><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g228"><path
+             id="path230"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 538.1431,314.5977 -7.1835,-4.6257 -1.2703,5.864 8.4538,-1.2383 z" /></g><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g232"><path
+             id="path234"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 352.1747,283.9237 178.3518,80.7852" /></g><path
+           id="path236"
+           style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
+           d="m 521.8138,56.99024 -6.0495,6.03355 -2.4756,-5.46547 8.5251,-0.56808 z" /><g
+           transform="matrix(1,0,0,-1,-16,425)"
+           id="g238"><path
+             id="path240"
+             style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
+             d="m 537.8138,368.0098 -6.0495,-6.0336 -2.4756,5.4655 8.5251,0.5681 z" /></g></g></g></g></svg>
\ No newline at end of file
--- a/presen/slide.html	Thu Feb 16 02:22:53 2017 +0900
+++ b/presen/slide.html	Thu Feb 16 07:14:40 2017 +0900
@@ -87,7 +87,7 @@
 <!-- === begin markdown block ===
 
       generated by markdown/1.2.0 on Ruby 2.2.0 (2014-12-25) [x86_64-darwin13]
-                on 2017-02-15 23:02:31 +0900 with Markdown engine kramdown (1.9.0)
+                on 2017-02-16 07:13:51 +0900 with Markdown engine kramdown (1.9.0)
                   using options {}
   -->
 
@@ -95,8 +95,10 @@
 <h1 id="section">メタ計算の重要性</h1>
 <ul>
   <li>プログラムを記述する際、通常の処理の他に、メモリ管理やスレッド管理、CPU や GPU の資源管理等、記述しなければならない処理が存在する。これらの計算を Meta Computation と呼ぶ。</li>
-  <li>Meta Computation を通常の計算から切り離して記述す るためには処理を細かく分割する必要がある。しかし、関 数やクラスなどの単位は容易に分割できない。</li>
-  <li>そこで当研究室では Meta Computation を柔軟に記述 するためのプログラミング言語の単位として Code Gear、 Data Gear という単位を提案している。</li>
+  <li>Meta Computation はノーマルレベルの計算から切り離して記述したい。</li>
+  <li>そのためには処理を細かく分割する必要がある。</li>
+  <li>しかし、関数やクラスなどの単位は容易に分割できない。</li>
+  <li>そこで当研究室では Meta Computation を柔軟に記述するためのプログラミング言語の単位として Code Gear、Data Gear という単位を提案している。</li>
 </ul>
 
 
@@ -115,17 +117,27 @@
 <!-- _S9SLIDE_ -->
 <h1 id="continuation-based-c-cbc">Continuation based C (CbC)</h1>
 <ul>
-  <li>Continuation based C (CbC) はこの Code Gear 単位を 用いたプログラミング言語として開発している。</li>
-  <li>Code Gear から 次の Code Gear へと goto による継続で遷移で処理を行い、引数として出力を与える。</li>
+  <li>Continuation based C (CbC) はこの Code Gear 単位を用いたプログラミング言語として開発している。</li>
+  <li>Code Gear から次の Code Gear へと goto による継続の遷移で処理を行い、引数として出力を与える。</li>
 </ul>
 
+<pre lang="Code_Gear"><code>__code cs0(int a, int b){
+  goto cs1(a+b);
+}
+
+__code cs1(int c){
+  goto cs2(c);
+}
+</code></pre>
+
 
 </div>
 <div class='slide '>
 <!-- _S9SLIDE_ -->
 <h1 id="gears-os">Gears OS</h1>
 <ul>
-  <li>Gears OS では並列実行するための Task を、実行する Code Gear 、実行に必要な Input Data Gear 、Output Data Gear の組で表現する。</li>
+  <li>Gears OS は Code Gear、 Data Gear の単位を用いて開発されており、CbC で記述されている。</li>
+  <li>並列実行するための Task を、実行する Code Gear 、実行に必要な Input Data Gear 、Output Data Gear の組で表現する。</li>
   <li>またGears OS では Meta Computation を Meta Code Gear、Meta Data Gear で表現する。</li>
   <li>Meta Code Gear は通常の Code Gear の直後に遷移され、Meta Computation を実行する。</li>
   <li>Meta Code Gear で OS の 機能であるメモリ管理やスレッド管理を行う。</li>
@@ -145,20 +157,85 @@
 </div>
 <div class='slide '>
 <!-- _S9SLIDE_ -->
+<h1 id="gearefgearimpl">Gearef、GearImpl</h1>
+<ul>
+  <li>Context には Allocation で生成した Data Gear へのポインタが格納されている。</li>
+  <li>Code Gear が Context にアクセスする際、ポインタを使用してデータを取り出すためコードが煩雑になってしまう。</li>
+</ul>
+
+<pre><code>__code clearSingleLinkedStack_stub(struct Context* context) {
+        SingleLinkedStack* stack = (SingleLinkedStack*)context-&gt;data[D_Stack]-&gt;Stack.stack-&gt;Stack.stack;
+        enum Code next = context-&gt;data[D_Stack]-&gt;Stack.next;
+        goto clearSingleLinkedStack(context, stack, next);
+}
+</code></pre>
+
+<ul>
+  <li>そこで Code Gear がデータを参照するための Gearef と GearImpl というマクロを定義した。</li>
+</ul>
+
+<pre><code>__code clearSingleLinkedStack_stub(struct Context* context) {
+        SingleLinkedStack* stack = (SingleLinkedStack*)GearImpl(context, Stack, stack);
+        enum Code next = Gearef(context, Stack)-&gt;next;
+        goto clearSingleLinkedStack(context, stack, next);
+}
+</code></pre>
+
+
+</div>
+<div class='slide '>
+<!-- _S9SLIDE_ -->
 <h1 id="stub-code-gear">stub Code Gear</h1>
 <ul>
+  <li>Code Gear が必要とする Data Gear を取り出す際に Context を通す必要がある。</li>
   <li>しかし、Context を直接扱うのはセキュリティ上好ましくない。</li>
   <li>そこで Context から必要なデータを取り出して Code Gear に接続する stub Code Gear を定義し、これを介して間接的に必要な Data Gear にアクセスする。</li>
 </ul>
 
+<pre lang="stub"><code>__code clearSingleLinkedStack(struct Context *context,struct SingleLinkedStack* stack,enum Code next) {
+    stack-&gt;top = NULL;
+    goto meta(context, next);
+}
+
+__code clearSingleLinkedStack_stub(struct Context* context) {
+        SingleLinkedStack* stack = (SingleLinkedStack*)GearImpl(context, Stack, stack);
+        enum Code next = Gearef(context, Stack)-&gt;next;
+        goto clearSingleLinkedStack(context, stack, next);
+}
+</code></pre>
+
+
+</div>
+<div class='slide '>
+<!-- _S9SLIDE_ -->
+<h1 id="contextstub-code-segment-">Context、stub Code Segment の自動生成</h1>
+<ul>
+  <li>Gears OS では通常の計算の他に Context や stub などの meta computation を記述する必要がある。</li>
+  <li>現在の CbC で Gears OS を記述すると、この meta computation の記述も行わなくてはならず、これには多くの労力を要する。</li>
+  <li>この記述を助けるために Context を生成する generate_context と stub Code Gear を生成する generate_stub を perl スクリプトで作成した。</li>
+</ul>
+
 
 </div>
 <div class='slide '>
 <!-- _S9SLIDE_ -->
-<h1 id="gearefgearimpl">Gearef、GearImpl</h1>
+<h1 id="generate-context">generate context</h1>
 <ul>
-  <li>Context には Allocation 等で生成した Data Gear へのポインタが格納されている。</li>
-  <li></li>
+  <li>generate_stub は指定された cbc ファイルの __code型である Code Gear を取得</li>
+  <li>generate_context は context.h から Data Gear、c ファイルから Code Gear の取得
+<img src="./fig/generate_context.svg" alt="message" width="800" /></li>
+</ul>
+
+
+</div>
+<div class='slide '>
+<!-- _S9SLIDE_ -->
+<h1 id="section-1">今後の課題</h1>
+<ul>
+  <li>本研究では interface の記述、CbC ファイルから Gears OS の記述に必要な Context と stub の生成を行う perl スクリプトの生成を行なった。</li>
+  <li>これにより Gears OS のコードの煩雑さは改善され、ユーザーは Context への接続を意識する必要がなくなった。</li>
+  <li>今後の課題は Code Gear から meta computation を行う meta Code Gear を生成できるようにし、ユーザーがメタレベルの処理を意識せずにコードを記述できるようにする。</li>
+  <li>また、今回 perl スクリプトによって Context や stub の生成を行なったが、LLVM/clang 上で実装しコンパイラで直接 CbC を実行できるようにすることも優先する。</li>
 </ul>
 <!-- === end markdown block === -->
 </div>
--- a/presen/slide.md	Thu Feb 16 02:22:53 2017 +0900
+++ b/presen/slide.md	Thu Feb 16 07:14:40 2017 +0900
@@ -6,21 +6,32 @@
 
 # メタ計算の重要性
 - プログラムを記述する際、通常の処理の他に、メモリ管理やスレッド管理、CPU や GPU の資源管理等、記述しなければならない処理が存在する。これらの計算を Meta Computation と呼ぶ。
-- Meta Computation は通常の計算から切り離して記述したい。
+- Meta Computation はノーマルレベルの計算から切り離して記述したい。
 - そのためには処理を細かく分割する必要がある。
 - しかし、関数やクラスなどの単位は容易に分割できない。
-- そこで当研究室では Meta Computation を柔軟に記述 するためのプログラミング言語の単位として Code Gear、 Data Gear という単位を提案している。
+- そこで当研究室では Meta Computation を柔軟に記述するためのプログラミング言語の単位として Code Gear、Data Gear という単位を提案している。
 
 # Code Gear と Data Gear
 - Code Gear は関数に比べて細かく分割されているので Meta Computation をより柔軟に記述できる。
 - Data Gear はデータの単位であり、Code Gear は 任意の数の Input Data Gear を参照して処理を行い、Output Data Gear を出力し処理を終える。
 
 # Continuation based C (CbC)
-- Continuation based C (CbC) はこの Code Gear 単位を 用いたプログラミング言語として開発している。
-- Code Gear から 次の Code Gear へと goto による継続で遷移で処理を行い、引数として出力を与える。
+- Continuation based C (CbC) はこの Code Gear 単位を用いたプログラミング言語として開発している。
+- Code Gear から次の Code Gear へと goto による継続の遷移で処理を行い、引数として出力を与える。
+
+```Code_Gear
+__code cs0(int a, int b){
+  goto cs1(a+b);
+}
+
+__code cs1(int c){
+  goto cs2(c);
+}
+```
 
 # Gears OS
-- Gears OS では並列実行するための Task を、実行する Code Gear 、実行に必要な Input Data Gear 、Output Data Gear の組で表現する。
+- Gears OS は Code Gear、 Data Gear の単位を用いて開発されており、CbC で記述されている。
+- 並列実行するための Task を、実行する Code Gear 、実行に必要な Input Data Gear 、Output Data Gear の組で表現する。
 - またGears OS では Meta Computation を Meta Code Gear、Meta Data Gear で表現する。
 - Meta Code Gear は通常の Code Gear の直後に遷移され、Meta Computation を実行する。
 - Meta Code Gear で OS の 機能であるメモリ管理やスレッド管理を行う。
@@ -29,10 +40,58 @@
 - Gears OS では Context と呼ばれる接続可能な Code/Data Gear のリスト、Temporal Data Gear のためのメモリ空間等を持っている Meta Data Gear がある。
 - Gears OSは必要なCode/DataGearに参照したい場合、このContext を通す必要がある。
 
+# Gearef、GearImpl
+- Context には Allocation で生成した Data Gear へのポインタが格納されている。
+- Code Gear が Context にアクセスする際、ポインタを使用してデータを取り出すためコードが煩雑になってしまう。
+
+```
+__code clearSingleLinkedStack_stub(struct Context* context) {
+        SingleLinkedStack* stack = (SingleLinkedStack*)context->data[D_Stack]->Stack.stack->Stack.stack;
+        enum Code next = context->data[D_Stack]->Stack.next;
+        goto clearSingleLinkedStack(context, stack, next);
+}
+```
+
+- そこで Code Gear がデータを参照するための Gearef と GearImpl というマクロを定義した。
+
+```
+__code clearSingleLinkedStack_stub(struct Context* context) {
+        SingleLinkedStack* stack = (SingleLinkedStack*)GearImpl(context, Stack, stack);
+        enum Code next = Gearef(context, Stack)->next;
+        goto clearSingleLinkedStack(context, stack, next);
+}
+```
+
 # stub Code Gear
+- Code Gear が必要とする Data Gear を取り出す際に Context を通す必要がある。
 - しかし、Context を直接扱うのはセキュリティ上好ましくない。
 - そこで Context から必要なデータを取り出して Code Gear に接続する stub Code Gear を定義し、これを介して間接的に必要な Data Gear にアクセスする。 
 
-# Gearef、GearImpl
-- Context には Allocation 等で生成した Data Gear へのポインタが格納されている。
-- 
+```stub
+__code clearSingleLinkedStack(struct Context *context,struct SingleLinkedStack* stack,enum Code next) {
+    stack->top = NULL;
+    goto meta(context, next);
+}
+
+__code clearSingleLinkedStack_stub(struct Context* context) {
+        SingleLinkedStack* stack = (SingleLinkedStack*)GearImpl(context, Stack, stack);
+        enum Code next = Gearef(context, Stack)->next;
+        goto clearSingleLinkedStack(context, stack, next);
+}
+```
+
+# Context、stub Code Segment の自動生成
+- Gears OS では通常の計算の他に Context や stub などの meta computation を記述する必要がある。
+- 現在の CbC で Gears OS を記述すると、この meta computation の記述も行わなくてはならず、これには多くの労力を要する。
+- この記述を助けるために Context を生成する generate_context と stub Code Gear を生成する generate_stub を perl スクリプトで作成した。
+
+# generate context 
+- generate\_stub は指定された cbc ファイルの \_\_code型である Code Gear を取得
+- generate\_context は context.h から Data Gear、c ファイルから Code Gear の取得
+<img src="./fig/generate_context.svg" alt="message" width="800" >
+
+# 今後の課題
+- 本研究では interface の記述、CbC ファイルから Gears OS の記述に必要な Context と stub の生成を行う perl スクリプトの生成を行なった。
+- これにより Gears OS のコードの煩雑さは改善され、ユーザーは Context への接続を意識する必要がなくなった。
+- 今後の課題は Code Gear から meta computation を行う meta Code Gear を生成できるようにし、ユーザーがメタレベルの処理を意識せずにコードを記述できるようにする。
+- また、今回 perl スクリプトによって Context や stub の生成を行なったが、LLVM/clang 上で実装しコンパイラで直接 CbC を実行できるようにすることも優先する。