10:30 - 11:00
|
Declaring and Checking Non-null Types in an Object-Oriented Language
Manuel Fähndrich,
Microsoft Research,
maf@microsoft.com Rustan Leino,
Microsoft Research,
leino@microsoft.com
Distinguishing non-null references from possibly null references
at the type level can detect null-related errors in object-oriented
programs at compile-time. This paper gives a proposal for
retrofitting a language such as C# or Java with non-null types. It
addresses the central complications that arise in constructors, where
declared non-null fields may not yet have been initialized, but the
partially constructed object is already accessible. The paper reports
experience with an implementation for annotating and checking
null-related properties in C# programs.
|
11:00 - 11:30
|
Object Equality Profiling
Darko Marinov,
MIT Laboratory for Computer Science,
marinov@lcs.mit.edu Robert O'Callahan,
IBM T.J. Watson Research Center,
roca@us.ibm.com
We present Object Equality Profiling (OEP), a new technique for
helping programmers discover optimization opportunities in programs.
OEP discovers opportunities for replacing a set of equivalent object
instances with a single representative object. Such a set represents
an opportunity for automatically or manually applying optimizations
such as hash consing, heap compression, lazy allocation, object
caching, invariant hoisting, and more. To evaluate OEP, we
implemented a tool to help programmers reduce the memory usage of
Java programs. Our tool performs a dynamic analysis that records all
the objects created during a particular program run. The tool
partitions the objects into equivalence classes, and uses collected
timing information to determine when elements of an equivalence class
could have been safely collapsed into a single representative object
without affecting the behavior of that program run. We report the
results of applying this tool to benchmarks, including two widely
used Web application servers. Many benchmarks exhibit significant
amounts of object equivalence, and in most benchmarks our profiler
identifies optimization opportunities clustered around a small number
of allocation sites. We present a case study of using our profiler to
find simple manual optimizations that reduce the average space used
by live objects in two SpecJVM benchmarks by 47% and 38%
respectively.
|