The revised report on the syntactic theories of sequential control and state
Theoretical Computer Science
Abstract models of memory management
FPCA '95 Proceedings of the seventh international conference on Functional programming languages and computer architecture
Featherweight Java: a minimal core calculus for Java and GJ
Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Formal semantics of weak references
Proceedings of the 5th international symposium on Memory management
Hi-index | 0.00 |
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.