# HG changeset patch # User Nobuyasu Oshiro # Date 1321572806 -32400 # Node ID ef5f7c93074a9ccd1d63d139d3b04b9a89b5fbf0 # Parent a729fd12d13fff8fdb8ab98db9f52219e2afeca9 modify tex diff -r a729fd12d13f -r ef5f7c93074a nobu-graduation.aux --- a/nobu-graduation.aux Fri Nov 18 07:49:13 2011 +0900 +++ b/nobu-graduation.aux Fri Nov 18 08:33:26 2011 +0900 @@ -17,8 +17,8 @@ \bibcite{5}{5} \bibcite{6}{6} \@writefile{toc}{\contentsline {subsection}{\numberline {3.2}typedefrec の実装}{2}} -\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces typedefrecの例}}{2}} -\newlabel{fig:typedefrec}{{3}{2}} +\newlabel{code:CbC-example}{{1}{2}} +\@writefile{lol}{\contentsline {lstlisting}{\numberline {1}CbCコード例}{2}} \@writefile{toc}{\contentsline {subsection}{\numberline {3.3}環境付き継続}{2}} \@writefile{toc}{\contentsline {subsubsection}{\numberline {3.3.1}\_\_return 変数の問題}{2}} \@writefile{toc}{\contentsline {subsection}{\numberline {3.4}x86\_64 での fastcall}{2}} diff -r a729fd12d13f -r ef5f7c93074a nobu-graduation.dvi Binary file nobu-graduation.dvi has changed diff -r a729fd12d13f -r ef5f7c93074a nobu-graduation.log --- a/nobu-graduation.log Fri Nov 18 07:49:13 2011 +0900 +++ b/nobu-graduation.log Fri Nov 18 08:33:26 2011 +0900 @@ -1,4 +1,4 @@ -This is e-pTeX, Version 3.1415926-p3.2-110415-2.3 (utf8.euc) (TeX Live 2011) (format=platex 2011.11.10) 18 NOV 2011 07:48 +This is e-pTeX, Version 3.1415926-p3.2-110415-2.3 (utf8.euc) (TeX Live 2011) (format=platex 2011.11.10) 18 NOV 2011 08:31 entering extended mode restricted \write18 enabled. %&-line parsing enabled. @@ -121,59 +121,80 @@ \f@ncyO@olf=\skip51 \f@ncyO@orf=\skip52 ) +(/usr/local/texlive/2011/texmf-dist/tex/latex/listings/listings.sty +\lst@mode=\count113 +\lst@gtempboxa=\box44 +\lst@token=\toks16 +\lst@length=\count114 +\lst@currlwidth=\dimen140 +\lst@column=\count115 +\lst@pos=\count116 +\lst@lostspace=\dimen141 +\lst@width=\dimen142 +\lst@newlines=\count117 +\lst@lineno=\count118 +\lst@maxwidth=\dimen143 + +(/usr/local/texlive/2011/texmf-dist/tex/latex/listings/lstmisc.sty +File: lstmisc.sty 2007/02/22 1.4 (Carsten Heinz) +\c@lstnumber=\count119 +\lst@skipnumbers=\count120 +\lst@framebox=\box45 +) +(/usr/local/texlive/2011/texmf-dist/tex/latex/listings/listings.cfg +File: listings.cfg 2007/02/22 1.4 listings configuration +)) +Package: listings 2007/02/22 1.4 (Carsten Heinz) + LaTeX Warning: Unused global option(s): [9.5pt]. -No file nobu-graduation.aux. +(./nobu-graduation.aux) \openout1 = `nobu-graduation.aux'. -LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 21. -LaTeX Font Info: ... okay on input line 21. -LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 21. -LaTeX Font Info: ... okay on input line 21. -LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 21. -LaTeX Font Info: ... okay on input line 21. -LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 21. -LaTeX Font Info: ... okay on input line 21. -LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 21. -LaTeX Font Info: ... okay on input line 21. -LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 21. -LaTeX Font Info: ... okay on input line 21. -LaTeX Font Info: Checking defaults for JY1/mc/m/n on input line 21. -LaTeX Font Info: ... okay on input line 21. -LaTeX Font Info: Checking defaults for JT1/mc/m/n on input line 21. -LaTeX Font Info: ... okay on input line 21. +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 22. +LaTeX Font Info: ... okay on input line 22. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 22. +LaTeX Font Info: ... okay on input line 22. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 22. +LaTeX Font Info: ... okay on input line 22. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 22. +LaTeX Font Info: ... okay on input line 22. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 22. +LaTeX Font Info: ... okay on input line 22. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 22. +LaTeX Font Info: ... okay on input line 22. +LaTeX Font Info: Checking defaults for JY1/mc/m/n on input line 22. +LaTeX Font Info: ... okay on input line 22. +LaTeX Font Info: Checking defaults for JT1/mc/m/n on input line 22. +LaTeX Font Info: ... okay on input line 22. +\c@lstlisting=\count121 LaTeX Font Info: External font `cmex10' loaded for size -(Font) <12> on input line 25. +(Font) <12> on input line 26. LaTeX Font Info: External font `cmex10' loaded for size -(Font) <8> on input line 25. +(Font) <8> on input line 26. LaTeX Font Info: External font `cmex10' loaded for size -(Font) <6> on input line 25. +(Font) <6> on input line 26. LaTeX Font Info: Font shape `JT1/mc/bx/n' in size <14.4> not available -(Font) Font shape `JT1/gt/m/n' tried instead on input line 28. +(Font) Font shape `JT1/gt/m/n' tried instead on input line 29. LaTeX Font Info: Font shape `JY1/mc/bx/n' in size <14.4> not available -(Font) Font shape `JY1/gt/m/n' tried instead on input line 28. +(Font) Font shape `JY1/gt/m/n' tried instead on input line 29. LaTeX Font Info: Font shape `JT1/mc/bx/n' in size <12> not available -(Font) Font shape `JT1/gt/m/n' tried instead on input line 49. +(Font) Font shape `JT1/gt/m/n' tried instead on input line 50. LaTeX Font Info: Font shape `JY1/mc/bx/n' in size <12> not available -(Font) Font shape `JY1/gt/m/n' tried instead on input line 49. +(Font) Font shape `JY1/gt/m/n' tried instead on input line 50. +File: figure/codesegment.eps Graphic file (type eps) +
LaTeX Font Info: Font shape `JT1/mc/bx/n' in size <10> not available -(Font) Font shape `JT1/gt/m/n' tried instead on input line 53. +(Font) Font shape `JT1/gt/m/n' tried instead on input line 86. LaTeX Font Info: Font shape `JY1/mc/bx/n' in size <10> not available -(Font) Font shape `JY1/gt/m/n' tried instead on input line 53. +(Font) Font shape `JY1/gt/m/n' tried instead on input line 86. +File: figure/continuation.eps Graphic file (type eps) +
+File: pic/emblem-bitmap.eps Graphic file (type eps) -LaTeX Warning: Reference `fig:cs' on page 1 undefined on input line 53. - -File: figure/codesegment.eps Graphic file (type eps) -
- -LaTeX Warning: Reference `fig:continue' on page 1 undefined on input line 90. - -File: figure/continuation.eps Graphic file (type eps) -
-File: pic/emblem-bitmap.eps Graphic file (type eps) - + Package Fancyhdr Warning: \headheight is too small (0.0pt): Make it at least 20.37784pt. @@ -185,12 +206,18 @@ ] -LaTeX Warning: Reference `fig:typedefrec' on page 2 undefined on input line 115 +LaTeX Warning: Reference `fig:typedefrec' on page 2 undefined on input line 116 . -File: figure/typedefrec.eps Graphic file (type eps) -
-Underfull \hbox (badness 3861) in paragraph at lines 205--207 +LaTeX Font Info: Try loading font information for OMS+cmr on input line 121. + +(/usr/local/texlive/2011/texmf-dist/tex/latex/base/omscmr.fd +File: omscmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions +) +LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10> not available +(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 121. + +Underfull \hbox (badness 3861) in paragraph at lines 212--214 []\OT1/cmr/m/n/10 GNU Com-piler Col-lec-tion (GCC) In-ter-nals: \JY1/mc/m/n/10 “ [] @@ -205,12 +232,12 @@ ) Here is how much of TeX's memory you used: - 927 strings out of 494163 - 10545 string characters out of 3160585 - 69616 words of memory out of 3000000 - 4355 multiletter control sequences out of 15000+200000 + 2134 strings out of 494163 + 28438 string characters out of 3160585 + 90636 words of memory out of 3000000 + 5546 multiletter control sequences out of 15000+200000 13716 words of font info for 53 fonts, out of 3000000 for 9000 745 hyphenation exceptions out of 8191 - 27i,15n,43p,208b,415s stack positions out of 5000i,500n,10000p,200000b,50000s + 27i,15n,43p,208b,1257s stack positions out of 5000i,500n,10000p,200000b,50000s -Output written on nobu-graduation.dvi (2 pages, 13832 bytes). +Output written on nobu-graduation.dvi (2 pages, 14012 bytes). diff -r a729fd12d13f -r ef5f7c93074a nobu-graduation.pdf Binary file nobu-graduation.pdf has changed diff -r a729fd12d13f -r ef5f7c93074a nobu-graduation.tex --- a/nobu-graduation.tex Fri Nov 18 07:49:13 2011 +0900 +++ b/nobu-graduation.tex Fri Nov 18 08:33:26 2011 +0900 @@ -3,6 +3,7 @@ \usepackage{url} \usepackage{picins} \usepackage{fancyhdr} +\usepackage{listings} \pagestyle{fancy} \lhead{\parpic{\includegraphics[height=1zw,clip,keepaspectratio]{pic/emblem-bitmap.eps}}琉球大学主催 工学部情報工学科 卒業研究発表会} \rhead{} @@ -114,12 +115,18 @@ C では関数や構造体の宣言の時に自分自身を引数にすることができない。 そこで“typedefrec” という構文を作り、図\ref{fig:typedefrec}のような宣言を行えるようにしたい。 -\begin{figure}[htpb] - \begin{center} -\scalebox{0.40}{\includegraphics{figure/typedefrec.eps}} - \end{center} - \caption{typedefrecの例} - \label{fig:typedefrec} +\begin{figure}[h] + \begin{minipage}[b]{.45\textwidth} + \begin{lstlisting}[caption=CbCコード例,label=code:CbC-example] +typedefrec void *funcA(int, funcA); + +typedefrec struct { + node left; + node right; +} *node; + \end{lstlisting} + \end{minipage} + \hfill \end{figure} より柔軟なプログラミングが行えるように typdefrec を実装を行いたい。 diff -r a729fd12d13f -r ef5f7c93074a nobu-graduation.tex~ --- a/nobu-graduation.tex~ Fri Nov 18 07:49:13 2011 +0900 +++ b/nobu-graduation.tex~ Fri Nov 18 08:33:26 2011 +0900 @@ -122,7 +122,7 @@ \label{fig:typedefrec} \end{figure} -より柔軟なプログラミングが行えるように typdefrec を実装したい。 +より柔軟なプログラミングが行えるように typdefrec を実装を行いたい。 %\subsubsection{typedefrec の実装方法} %typedefrec @@ -133,12 +133,15 @@ %そこで typedefrec の付いた関数は先行して宣言を行うことにする。 %すると、宣言中でもハッシュテーブルから関数の情報をとることができるようになる。 -\subsection{\_\_return 変数} +%\subsection{\_\_return 変数} +\subsection{環境付き継続} CbC では通常の C の関数からコードセグメントに継続する際、 -元の C の関数に処理を戻すことがように \_\_return 変数が用意してある。 -\_\_return 変数は参照した関数のアドレスを覚えておく変数である。 -コードセグメントの継続の際に引数で渡して扱う。 -引数として渡された \_\_return 変数をコードセグメントとして使うことで C の関数に戻る。 +元の C の関数に処理を戻すことがように環境付き継続を実装してある。 +環境付き継続は \_\_return 変数を参照することで用いることができる。 +\_\_return 変数は参照されると、参照した関数のアドレスを覚えておく。 +コードセグメントの継続の際に引数に \_\_return 変数を渡すことで、 +関数の呼び出し元のアドレスも渡すことができる。 +後は引数として渡されたきたアドレスへ飛ぶことでいつでも C の関数に戻ることができる。 \subsubsection{\_\_return 変数の問題} しかし現在この \_\_return の値は static で実装されている。 @@ -196,10 +199,10 @@ \bibitem{5}{下地篤樹,河野真治}: “線形時相論理を用いたContinuation based C プログラムの検証”. 琉球大学大学院 理工学研究科 情報工学専攻 学位論文(修士), 2008 -\bibitem{6}{楊挺,河野真治}: -“Continuation based C の実装”. 琉球大学大学院 理工学研究科 情報工学専攻 学位論文(修士), 2002 +%\bibitem{6}{楊挺,河野真治}: +%“Continuation based C の実装”. 琉球大学大学院 理工学研究科 情報工学専攻 学位論文(修士), 2002 -\bibitem{7}{GNU Compiler Collection (GCC) Internals}: +\bibitem{6}{GNU Compiler Collection (GCC) Internals}: “http://gcc.gnu.org/onlinedocs/gccint/”