• 検索結果がありません。

C#のためのコンテキスト指向プログラミングとStrategyパターンの比較

N/A
N/A
Protected

Academic year: 2021

シェア "C#のためのコンテキスト指向プログラミングとStrategyパターンの比較"

Copied!
1
0
0

読み込み中.... (全文を見る)

全文

(1)情報処理学会論文誌. プログラミング. Vol.9 No.4 31 (Sep. 2016). 発表概要. C#のためのコンテキスト指向プログラミングと Strategy パターンの比較 上條 弘貴1,a). 渡辺 晴美1. 2016年2月29日発表. 本発表では,C#に基づいたコンテキスト指向プログラムと Strategy パターンとの比較を行う.コンテ キスト指向プログラミング(Context-Oriented Programming: COP)は,コンテキストに依存した振る舞 いをモジュール化し,実行時にコンテキストに応じて動的にそれらのモジュールを変更するためのプログ ラミング技術である.Strategy パターンはオブジェクト指向プログラミング言語のデザインパターンの 1 つである.Strategy パターンではアルゴリズムの集合を定義し,各アルゴリズムをカプセル化することで 実行時にそれらのアルゴリズムをコンテキストに応じて動的に交換可能とする.これらの手法はいずれも プログラム実行時のイベントに応じてモジュールの切り替えを可能とする点で類似している.以上をふま えて同一要求のシステムを COP と Strategy パターンで開発し比較を行う.評価内容として,記述量およ び,コンテキスト依存の振る舞い記述の差異をあげ,それらの原因について分析,比較検討を行い評価す る.本評価のために,実行時にコンテキストに応じて振る舞いが切り替わるロボットシステムを開発する. ロボットのコンテキストとして屋内外やゴミの種類を想定している.実現に際し,これらのコンテキスト を見立てた環境を構築する.ロボットが室内にいるときは吸引機で吸引動作を行い,室外にいるときはブ ラシを使い掃き動作を行うものとする.上述した屋内外のシステム切り替え等により,コンテキスト切り 替え部分に関して比較検討を行う.. A Comparison between a Context-oriented Programming C# Framework and the Strategy Pattern Hiroki Kamijo1,a). Harumi Watanabe1. Presented: February 29, 2016. The presentation introduces a comparison between our Context-Oriented Programming C# framework (COP C#) and the Strategy pattern. Context-Oriented Programming (COP) treats context-dependent behavior that is modularized as layers and to change them at runtime. On the other hand, the Strategy pattern deals with the algorithm modules for encapsulating for context-dependent behavior. In spite of different type of those modules, both techniques handle the context-dependent behavior. To make clear the difference between the COP C# and the Strategy pattern, we develop two cleaner robot systems based on their two ways. The behavior of those robots reflects in the contexts that depends on the places and the garbage sorts. Our robot provides a service that uses the vacuum cleaner part in rooms. If the robot moves to the outside of the room, it changes the service that makes operate the brush part. Those mechanisms give us the advantages of the COP C# and the Strategy pattern.. 1. a). 東海大学大学院情報通信学研究科 Tokai University School of Information and Telecommunication Engineering, Minato, Tokyo 108–0074, Japan [email protected]. c 2016 Information Processing Society of Japan . 31.

(2)

参照

関連したドキュメント

以上,本研究で対象とする比較的空気を多く 含む湿り蒸気の熱・物質移動の促進において,こ

納付日の指定を行った場合は、指定した日の前日までに預貯金口座の残

また、JR東日本パス (本券) を駅の指定席券売機に

次に、第 2 部は、スキーマ療法による認知の修正を目指したプログラムとな

北区では、外国人人口の増加等を受けて、多文化共生社会の実現に向けた取組 みを体系化した「北区多文化共生指針」

LF/HF の変化である。本研究で はキャンプの日数が経過するほど 快眠度指数が上昇し、1日目と4 日目を比較すると 9.3 点の差があ った。

「養子縁組の実践:子どもの権利と福祉を向上させるために」という

WANO 、 INPO が策定した原子力安全を実現するための行動例( Traits 、 PO&C