Partial Evaluation of Java Reflective Programs in the Presence of Polymorphism and Dynamic Loading

Bibliographic Information

Other Title
  • 多相性と動的ロードを考慮したJavaリフレクションの部分評価

Search this article

Description

Java のリフレクションは直列化,JavaBeans でのコンポーネントの動的結合,Walkabout などで使われている.しかし,リフレクションを用いたメソッド呼び出しやフィールド参照はベースレベルのそれと比べてかなり遅い.これまでにいくつかの静的解析とコード変換によるリフレクションの最適化の研究が提案されてきたが,それらの適用範囲は制限されており,多相呼び出しや動的ロードがある場合にはほとんど効果が期待できない.多相呼び出しと動的ロードは柔軟なJava プログラムでは多用されているので問題となる.本発表では,部分評価を用いてJava のリフレクションを最適化する技法を提案する.多相性に対しては多相的な引数を単相化する特化技法を,動的ロードのために拡張オブジェクトを用いた技法を提案する.Walkabout を用いた実験を行い,飛躍的な実行時間の改善を達成することができた.

Re flection in Java is used in serialization,dynamic binding of components in JavaBeans, Walkabout,etc.Unfortunately,however,a re ?ective method invocation or ?eld access is considerably slower than a corresponding base-level access.Several researchers have proposed optimization techniques for re ?ection by static analysis and code transformation,but their scopes are limited.Those techniques are not effective in the presence of polymorphism and/or dynamic loading,which are often used in ?exible Java programs.In this presentation,we propose optimization techniques of re ?ection in Java using partial evaluation.For polymorphism, we propose a specialization technique that makes polymorphic parameters monomorphic.For dynamic loading,we propose a technique using the Extension Object pattern.We have done experiments using Walkabout and achieved signi ?cant improvement in execution time.

Journal

Keywords

Details 詳細情報について

Report a problem

Back to top