Analysing Aliasing in Java Applications

University essay from Uppsala universitet/Institutionen för informationsteknologi

Author: Björn Berggren; [2020]

Keywords: ;

Abstract: Aliasing refers to the possibility of having multiple references to the same memory location and is a cornerstone concept in the imperative programming paradigm. As applications grow large, it is hard for programmers to keep track of all places in the code where they employ aliasing, possibly resulting in hard-to-predict runtime errors.  I present a tool, model and query language to perform dynamic aliasing analysis on   Java programs. The tool uses the model to simulate the full execution of a program, including how and when objects and references between them are created and removed. The query language consists of constructs that can be nested to form logical expressions, operating on the model to check whether a certain object remains in a certain condition throughout the execution. The language is designed to monitor lifetimes of specific objects and collect information about the execution as a whole. I performed an experiment using the tool, examining traces from programs for  profiling, searching and parsing, showing that applications have different aliasing behaviour. All programs mostly use objects based on built-in Java classes, indicating that programmers could benefit from gaining the ability to control and limit how such objects can be aliased. The experiment shows that the tool works and can be useful in this research field. In future work, the tool should be optimised and tested in more extensive experiments.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)