Encapsulating objects with confined types

  • Authors:
  • Christian Grothoff;Jens Palsberg;Jan Vitek

  • Affiliations:
  • Slt/supgt/3lt//supgt/ Lab, Department of Computer Sciences, Purdue University;Slt/supgt/3lt//supgt/ Lab, Department of Computer Sciences, Purdue University;Slt/supgt/3lt//supgt/ Lab, Department of Computer Sciences, Purdue University

  • Venue:
  • OOPSLA '01 Proceedings of the 16th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

Object-oriented languages provide little support for encapsulating objects. Reference semantics allows objects to escape their defining scope. The pervasive aliasing that ensues remains a major source of software defects. This paper introduces Kacheck/J a tool for inferring object encapulation properties in large Java programs. Our goal is to develop practical tools to assist software engineers, thus we focus on simple and scalable techniques. Kacheck/J is able to infer confinement for Java classes. A class and its sublasses are confined if all of their instances are encapsulated in their defining package. This simple property can be used to identify accidental leaks of sensitive objects. The analysis is scalable and efficient; Kacheck/J is able t infer confinement on a corpus of 46,000 classes (115 MB) in 6 minutes