Dissertation/Thesis Abstract

Stationary fields in object -oriented programs
by Unkel, Christopher, Ph.D., Stanford University, 2009, 98; 3395874
Abstract (Summary)

This dissertation introduces stationary fields, which are widely prevalent in Java programs, and which have a property useful for reasoning about programs Java programmers can document that the relationship between two objects is unchanging by declaring the field that encodes that relationship to be final This information can be used in program understanding and detection of errors in new code additions. Unfortunately, few fields in programs are actually declared final. Programs often contain fields that could be final, but are not declared so. Moreover, the definition of final has restrictions on initialization that limit its applicability.

We introduce stationary fields as a generalization of final. A field in a program is stationary if, for every object that contains it, all writes to the field occur before all the reads. Unlike the definition of final fields, there can be multiple writes during initialization, and initialization can span multiple methods.

We have developed an efficient algorithm for inferring which fields are stationary in a program, based on the observation that many fields acquire their value very close to object creation. We presume that an object's initialization phase has concluded when its reference is saved in some heap object. We perform precise analysis only regarding recently created objects. Applying our algorithm to real-world Java programs demonstrates that stationary fields are very common. Furthermore, stationary fields are much more common than final fields: 44-59% vs. 11-17% respectively in our benchmarks.

Guided by the experimental results, we show two programming idioms that violate the stationary field property, how the definition may be expanded to cover these cases, and corresponding analyses to locate these fields.

We show four applications of stationary fields to program analysis and understanding, as first examples of how stationary fields are useful. Three of the applications are to concurrent programs, an increasingly important area. They take advantage of an important property of stationary fields: because they do not change after their initialization, inter-thread interference through them is impossible. This property makes reasoning about concurrent programs easier, and we expect applications of stationary fields to concurrent programs to be a fruitful avenue of further research.

Indexing (document details)
Advisor: Lam, Monica S.
School: Stanford University
School Location: United States -- California
Source: DAI-B 71/01, Dissertation Abstracts International
Subjects: Computer science
Keywords: Object-oriented programs, Stationary fields
Publication Number: 3395874
ISBN: 9781109583670
Copyright © 2019 ProQuest LLC. All rights reserved. Terms and Conditions Privacy Policy Cookie Policy