A Language-agnostic Approach to Collecting Object Graphs Based on a Language Implementation Framework
Bibliographic Information
- Other Title
-
- 言語実現フレームワークに基づく汎言語的オブジェクトグラフ収集手法
Search this article
Description
ライブプログラミング環境は,プログラム実行中の値や実行結果をプログラムが編集されると即座に再実行して表示する.既存のライブプログラミング環境は,この機構を専用のインタプリタやプログラム変換器といった,対象言語に大きく依存した実現をしている.本研究は,ライブプログラミング環境を汎言語的,すなわち実現の大部分は対象言語に依存しない共通のものとすることを目標として,言語実現フレームワークを用いた設計・実現方法を提案する.この目標に向けた第1歩として,本発表では,データ構造ライブプログラミング環境Kanonの実現で必要となる,JavaScriptプログラムが実行中に生成するオブジェクトグラフを収集する機構を,言語実現フレームワークGraal/Truffleに基づいて実現する.提案手法はオブジェクトグラフ収集機能を持ったJavaScript仮想機械を作るものであり,その実現はGraal/Truffleに対するオブジェクト操作を監視するAPIの追加と,JavaScript言語定義からのAPI呼び出しからなる.実験では,オブジェクトグラフを可視化するためにKanonが必要とする情報をKanon仮想機械で収集できることを確認した.作成した仮想機械に対しては,既存のKanon処理系のオブジェクト収集機構との性能比較を行った.
A live programming environment displays intermediate values and execution results of a program by rerunning it when the program is edited. In existing live programming environments, this mechanism is implemented by language-dependent methods such as specialized interpreters or program converters. The goal of this research is to make a live programming environment language-agnostic. To achieve this, the environment needs to be designed and implemented with a language implementation framework to make most of the implementation language-independent. As a first step toward this goal, we propose a mechanism for collecting object graphs generated during the execution of JavaScript programs using the language implementation framework Graal/Truffle in order to improve Kanon, a live programming environment for data structures, in terms of language-agnosticism and performance. The proposed mechanism creates a JavaScript virtual machine that collects object graphs. The implementation consists of adding an API for monitoring object operations to Graal/Truffle and calling it from the virtual machine. In our experiments, we confirmed that the virtual machine can collect the information necessary for visualizing object graphs on Kanon. Furthermore, we compared its performance with the object collection mechanism of the original one.
Journal
-
- 情報処理学会論文誌プログラミング(PRO)
-
情報処理学会論文誌プログラミング(PRO) 15 (1), 16-16, 2022-01-05
情報処理学会
- Tweet
Details 詳細情報について
-
- CRID
- 1050290770005585152
-
- NII Article ID
- 170000186180
-
- NII Book ID
- AA11464814
-
- ISSN
- 18827802
-
- Text Lang
- ja
-
- Article Type
- journal article
-
- Data Source
-
- IRDB
- CiNii Articles