Research Article Open Access

Abstract Interpretation of Java Bytecode for Immutability Analysis

Oliver Haase1
  • 1 Hochschule Konstanz University of Applied Sciences, Germany

Abstract

Even though immutability is a desirable property, especially in a multi-threaded environment, implementing immutable Java classes is surprisingly hard because of a lack of language support. We present a static analysis tool using abstract bytecode interpretation that checks Java classes for compliance with a set of rules that together constitute state-based immutability. Being realized as a Find Bugs plug in, the tool can easily be integrated into most IDEs and hence the software development process. Our evaluation on a large, real world codebase shows that the average run-time effort for a single class is in the range of a few milliseconds, with only a very few statistical spikes.

Journal of Computer Science
Volume 12 No. 7, 2016, 314-322

DOI: https://doi.org/10.3844/jcssp.2016.314.322

Submitted On: 28 July 2014 Published On: 23 August 2016

How to Cite: Haase, O. (2016). Abstract Interpretation of Java Bytecode for Immutability Analysis. Journal of Computer Science, 12(7), 314-322. https://doi.org/10.3844/jcssp.2016.314.322

  • 3,710 Views
  • 2,732 Downloads
  • 0 Citations

Download

Keywords

  • Immutability
  • Abstract Interpretation
  • Bytecode