• Medientyp: E-Artikel
  • Titel: A calculus for java's reference objects
  • Beteiligte: Gabay, Yarom; Kfoury, Assaf J.
  • Erschienen: Association for Computing Machinery (ACM), 2007
  • Erschienen in: ACM SIGPLAN Notices
  • Sprache: Englisch
  • DOI: 10.1145/1294297.1294299
  • ISSN: 0362-1340; 1558-1160
  • Schlagwörter: Computer Graphics and Computer-Aided Design ; Software
  • Entstehung:
  • Anmerkungen:
  • Beschreibung: <jats:p>Java's Reference objects provide the programmer with limited control over the process of memory management. Although reference objects are often helpful, they introduce nondeterminism into program evaluation and lead to ambiguous program outcome. In this paper we present a calculus to formally reason about Java's Reference objects. We model multiple levels of reference objects in a single calculus and apply a different garbage collection policy to each one of them. Accordingly, weak references are given the semantics of eager collection and soft references are given the semantics of lazy collection. In addition, we constrain garbage collection with the scarcity of two resources: time and space. We demonstrate the viability of our calculus by modeling a Java program which addresses a commonly-encountered caching problem. Using our model, we reason about the program's evaluation and interaction with the garbage collector.</jats:p>