沙箱之外:Java中输入/输出方法的研究
Outside the Sandbox: A Study of Input/Output Methods in Java
AI总结:
本文通过静态和动态分析Java项目中I/O方法的使用情况,发现大量方法涉及I/O,强调工具设计需集成I/O元数据。
摘要:
编程语言通常将内部沙箱(由对象和变量等实体组成)与外部世界(如文件或网络)区分开来。尽管与外部世界的通信对实时编程、可逆调试、测试以及一般的程序分析构成了根本性挑战,但关于这一现象的研究却很少。在本文中,我们提出了一项关于Java中输入/输出(I/O)方法使用普遍性的初步实证研究。我们手动将Java标准版发行版中的1435个原生方法分类为非I/O和I/O相关方法,后者进一步分为桌面或文件相关等领域。根据对798个项目的调用图的静态分析,约57%的方法可能调用I/O原生方法。对16个基准测试的动态分析结果显示,21%的执行方法直接或间接调用了I/O原生方法。我们得出结论,忽视I/O对工具设计者来说并非可行选项,并建议将I/O相关元数据与源代码集成,以便于查询。
英文摘要:
Programming languages often demarcate the internal sandbox, consisting of entities such as objects and variables, from the outside world, e.g., files or network. Although communication with the external world poses fundamental challenges for live programming, reversible debugging, testing, and program analysis in general, studies about this phenomenon are rare. In this paper, we present a preliminary empirical study about the prevalence of input/output (I/O) method usage in Java. We manually categorized 1435 native methods in a Java Standard Edition distribution into non-I/O and I/O-related methods, which were further classified into areas such as desktop or file-related ones. According to the static analysis of a call graph for 798 projects, about 57% of methods potentially call I/O natives. The results of dynamic analysis on 16 benchmarks showed that 21% of the executed methods directly or indirectly called an I/O native. We conclude that neglecting I/O is not a viable option for tool designers and suggest the integration of I/O-related metadata with source code to facilitate their querying.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。