Item type |
Trans(1) |
公開日 |
2016-09-12 |
タイトル |
|
|
タイトル |
有効範囲を既知のコールパスに限定するRuby向けの安全なクラス拡張Method seals |
タイトル |
|
|
言語 |
en |
|
タイトル |
Method Seals: Safe Class Extension for Ruby Limiting the Scope to Known Call Paths |
言語 |
|
|
言語 |
jpn |
キーワード |
|
|
主題Scheme |
Other |
|
主題 |
[通常論文] クラス拡張,Ruby,スコープ |
資源タイプ |
|
|
資源タイプ識別子 |
http://purl.org/coar/resource_type/c_6501 |
|
資源タイプ |
journal article |
著者所属 |
|
|
|
東京大学大学院情報理工学系研究科 |
著者所属 |
|
|
|
東京大学大学院情報理工学系研究科 |
著者所属(英) |
|
|
|
en |
|
|
Graduate School of Information Science and Technology, The University of Tokyo |
著者所属(英) |
|
|
|
en |
|
|
Graduate School of Information Science and Technology, The University of Tokyo |
著者名 |
福室, 嶺
千葉, 滋
|
著者名(英) |
Ryo, Fukumuro
Shigeru, Chiba
|
論文抄録 |
|
|
内容記述タイプ |
Other |
|
内容記述 |
本論文では,有効範囲を既知のコールパス上に限定することで安全に利用できるクラス拡張method sealsを提案する.クラス拡張は既存のクラスを拡張するための言語機構であり,RubyやAspectJ,C#など様々な言語に取り入れられている.クラス拡張を用いることで,既存のクラスに対してソースコードを書き換えることなくメソッドの追加や再定義を行える.しかし,クラス拡張はモジュラリティの向上に寄与する一方で,誤動作を引き起こしやすい.これはクラス拡張どうしの衝突や,クラス拡張が想定外の領域で有効になることが主な要因である.こうした問題を解決するために,プログラマのコードに対する理解度に応じてその有効範囲を段階的に拡張できるように設計されたクラス拡張method sealsを提案する.本機構では,プログラマにとって未知のパッケージのコードはブラックボックス内にあると見なし,クラス拡張が無効になる.また,ブラックボックス内から発するコールパス上ではそれ以外のコードも一時的にブラックボックス内にあるものと見なす.これにより,クラス拡張がブラックボックス内のコードに対して予期せぬ影響を与え,ひいてはプログラム全体の誤動作を引き起こすことを防げる.本研究ではRuby処理系上にmethod sealsを実装し,いくつかの条件下でその実行性能を評価した. |
論文抄録(英) |
|
|
内容記述タイプ |
Other |
|
内容記述 |
We propose method seals, a safe class extension limiting its scope to known call paths. Class extensions allow us to extend an existing class to add or modify a method without rewriting its code, and they are supported by various languages including Ruby, AspectJ, and C#. They are easy to cause unintended behavior due to collision among multiple extensions or being enabled in an unexpected domain while they contribute to improvement modularity. To address such a problem, we propose method seals designed to allow class extensions control their effective range depending on the degree of understanding about a code base of programmers. Method seals regard code in an unknown package as a black box and disable class extensions there. Furthermore, they also temporarily regard callees of such a package as being in a black box. This prevents class extensions from giving an unexpected impact on codes in black boxes and causing an unintended behavior of a whole program. We implement method seals on Ruby interpreter and evaluates its performance under several conditions. |
書誌レコードID |
|
|
収録物識別子タイプ |
NCID |
|
収録物識別子 |
AA11464814 |
書誌情報 |
情報処理学会論文誌プログラミング(PRO)
巻 9,
号 4,
p. 16-26,
発行日 2016-09-12
|
ISSN |
|
|
収録物識別子タイプ |
ISSN |
|
収録物識別子 |
1882-7802 |
出版者 |
|
|
言語 |
ja |
|
出版者 |
情報処理学会 |