Cutting Java Expressions into Lines for Detecting their Evaluation at Runtime

I. Kume, Etsuya Shibayama, Masahide Nakamura, Naoya Nitta
{"title":"Cutting Java Expressions into Lines for Detecting their Evaluation at Runtime","authors":"I. Kume, Etsuya Shibayama, Masahide Nakamura, Naoya Nitta","doi":"10.1145/3318236.3318259","DOIUrl":null,"url":null,"abstract":"Practical Java Debuggers can evaluate expressions at specified break points. Such evaluations may cause extra side effects and make an execution at debugging different from the original one. As a result, Java developers often have to edit the original source code in order to safely examine runtime values of expressions. In order to cope with this problem, we aim at developing a new feature for a debugger to detect evaluations of an expression by a Java virtual machine. This debugging feature doesn't introduce any extra side effects, and will enable Java programmers to examine runtime values of an expression by simply specifying it. The implementation of the above feature requires a debugger to make correspondence between bytecode instructions executed by a Java Virtual Machine and expressions in Java source texts. As the first step toward our goal, we have developed a source code translation method to make this correspondence using LineNumberTable attributes in class files generated by a standard Java compiler. There are still several cases that this method fails to automatically determine appropriate correspondence between bytecode instructions and expressions, but its solution has been left as future work. In this paper, we introduce a formalization to this method as a basis of our rigid analysis of failure cases. We evaluate our analysis method by conducting an experimental task to find failure patterns whose template is defined by our formalization.","PeriodicalId":228626,"journal":{"name":"Proceedings of the 2019 2nd International Conference on Geoinformatics and Data Analysis","volume":"75 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-03-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 2019 2nd International Conference on Geoinformatics and Data Analysis","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3318236.3318259","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

Abstract

Practical Java Debuggers can evaluate expressions at specified break points. Such evaluations may cause extra side effects and make an execution at debugging different from the original one. As a result, Java developers often have to edit the original source code in order to safely examine runtime values of expressions. In order to cope with this problem, we aim at developing a new feature for a debugger to detect evaluations of an expression by a Java virtual machine. This debugging feature doesn't introduce any extra side effects, and will enable Java programmers to examine runtime values of an expression by simply specifying it. The implementation of the above feature requires a debugger to make correspondence between bytecode instructions executed by a Java Virtual Machine and expressions in Java source texts. As the first step toward our goal, we have developed a source code translation method to make this correspondence using LineNumberTable attributes in class files generated by a standard Java compiler. There are still several cases that this method fails to automatically determine appropriate correspondence between bytecode instructions and expressions, but its solution has been left as future work. In this paper, we introduce a formalization to this method as a basis of our rigid analysis of failure cases. We evaluate our analysis method by conducting an experimental task to find failure patterns whose template is defined by our formalization.
将Java表达式切成行,以便在运行时检测它们的求值
实用的Java调试器可以在指定的断点处计算表达式。这样的计算可能会导致额外的副作用,并使调试时的执行与最初的执行不同。因此,Java开发人员经常必须编辑原始源代码,以便安全地检查表达式的运行时值。为了解决这个问题,我们的目标是为调试器开发一个新特性来检测Java虚拟机对表达式的求值。这个调试特性不会引入任何额外的副作用,并且允许Java程序员通过简单地指定表达式来检查它的运行时值。上述特性的实现需要调试器在Java虚拟机执行的字节码指令和Java源文本中的表达式之间进行对应。作为实现目标的第一步,我们开发了一个源代码翻译方法,使用标准Java编译器生成的类文件中的LineNumberTable属性来实现这种通信。在某些情况下,该方法仍无法自动确定字节码指令和表达式之间的适当对应关系,但其解决方案将留给未来的工作。在本文中,我们引入了这种方法的形式化,作为我们对失效案例进行刚性分析的基础。我们通过进行一个实验任务来评估我们的分析方法,以寻找模板由我们的形式化定义的故障模式。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书