Lampinen S. (2010)
Detecting Roles of Variables in an Intermediate Language
Master's Thesis, Department of Computer Science and Engineering, School of Science and Technology, Aalto University.
Abstract: Learning new programming language requires a lot of effort. On top of syntax and semantics, experienced programmers have tacit knowledge on how certain problems are solved on the language, some knowledge on how programs should be written and also expect the code to have certain features when they read someone else's code. To aid in learning a new language and also to transport this tacit knowledge, several research reports offer roles of variables as solution.
Several tools have also been written that try to detect roles of variables from source code. Two of these tools use variable usage properties, its usages and definitions location in code in relation to other code and deduce if the variable has certain role characteristic.
In this thesis a mapping between the roles of variables usage properties and JVM bytecode was made. The aim is to find the same or similar characteristics on lower level language. If properties can be detected on lower level language they can also be detected for numerous languages that are available and compile to JVM bytecode.
The mapping was tested by implementing a prototype. Variable usage properties seemed to be detected well, but the actual role identication did not work perfectly. Even though there are limitations to what prototype using the mapping was able to do well, it seems plausible that roles of variables can be detected in bytecode and further research is certainly needed.
Last updated: September 30, 2010