view cbc.tex @ 7:5cfa596eece1

*** empty log message ***
author akira
date Wed, 05 Mar 2008 11:25:22 +0900
parents cba427f17200
children
line wrap: on
line source

\section{CbCの概要}
CbCはC言語からループ制御構造とサブルーチンコールを取り除き、継続を導入し
た言語である\cite{bib:CbC}。code-segmentは引数付きgotoで接続することで継
続を実現する。
%以下は階乗の計算の例題である。\\
%\small{
%\input{src/fact.c}
%}
%\normalsize

code-segmentはキーワードcodeを用いることで関数のように定義される。引数部
分はinterfaceと呼ぶ。code-segmentからの脱出は引数付きgotoである。よって
CbCのプログラムは複数のcode-segmentがgotoで接続された物になる。(図\ref{fig:cbc-goto})
\begin{figure}[htb]
\begin{center}
\includegraphics[scale=.7]{./fig/code-goto.pdf}
\end{center}
\caption{CbCプログラムの構成}
\label{fig:cbc-goto}
\end{figure}