Revealing Implicit Correspondence between Bytecode Instructions and Expressions Determined by Java Compilers

Most Java debuggers designate a source code line as the executed part in the source code at each step-by-step execution. Such designation is based on compilation results which give line numbers to byte code instructions executed at debugging. Because a source code line contains many expressions in general, debugger users must simulate microscopic executions of such contained expressions in their mind. This kind of internal simulation is one of the causes of inefficiency at debugging. We aim at supporting an implementation of a feature to designate expressions instead of source code lines. As its first step, we propose a method to examine how a given compiler maps bytecode instructions to expressions. The key idea of our method is to decompose lexical tokens in each expression into different source code lines. Because of the one-to-one correspondence between line numbers and tokens obtained by our decomposition, we can reveal hidden intention of a compiler to map bytecode instructions to expressions. In this paper, we introduce our experimental results to apply our method to Java programs compiled by a standard Java compiler. We discuss the feasibility of our method with respect to our goal, which is an implementation of a feature to designate expressions instead of source code lines.