著者
今井 敬吾 結縁祥治 阿草 清滋
出版者
一般社団法人情報処理学会
雑誌
情報処理学会論文誌プログラミング(PRO) (ISSN:18827802)
巻号頁・発行日
vol.47, no.16, pp.10-28, 2006-10-15
参考文献数
17

我々はプログラミング言語Haskellへ,型付き非同期局所化pi計算(typed Asynchronous Localized $\pi$-calculus; ALpi)を,ネットワークプログラミングのためのフレームワークとして埋め込む手法を提案する.本フレームワークは埋め込み言語として実装されることで以下の利点を持つ:(1) Haskellで構築されているため処理系が頑健である,(2) Haskellのリテラル,型や関数といった言語要素をフレームワークに組み込むことができる.さらに,ALpiのmobilityに対する制限はフレームワークの実装を簡単にする.本フレームワークでは,ALpiのプロセスはPiMonadと呼ばれるHaskellのモナドとして実装する.結果として,通信により引き起こされる副作用は型のPiMonadタグで区別される.ALpiのサブタイプ関係はHaskellの多引数型クラスで実現する.サブタイプ関係にある型の対は通信の方向を反映した3つの2引数型クラスに属する.本フレームワークを用いた例としてTCP/IPネットワーク上のインスタント・メッセンジャアプリケーションの構築例を示し,有用性と利点を述べる.We propose an embedding of the typed Asynchronous Localized pi-calculus (ALpi) into the programming language Haskell as a framework for network programming. The framework has following advantages due to the embedded language nature: (1) the framework is robust due to being built upon the Haskell framework, and (2) the framework can incorporate various Haskell language elements, such as literals, types, and functions, in the framework. Moreover, the limitation of mobility in ALpi simplifies the implementation of the framework. ALpi processes are implemented by means of a Haskell monad called PiMonad. As the result, side-effects caused by communications are distinguished by the tags of PiMonad in typing. The subtyping relations is realized by multi-parameter type classes in Haskell, where a pair of subtype-related types belongs to three binary type classes reflecting the directions of communication. We illustrate the usefulness and benefits of our framework with an example of an implementation of instance messenger application over TCP/IP network.

言及状況

はてなブックマーク (1 users, 1 posts)

Twitter (2 users, 2 posts, 1 favorites)

収集済み URL リスト