TU August 2, 16:45 - 17:30
Demonstrations

D7 — Eclipse Plug-ins for Statically Checking and Visualizing Ownership Domain Annotations

Marwan Abi-Antoun and Jonathan Aldrich (Carnegie Mellon University, USA)

Abstract

Researchers have proposed many ownership type systems but have implemented only a few of them. As a result, few ownership type systems have been evaluated in substantial case studies on real, complex, object-oriented code. Evaluating these type systems on real code was made more difficult by implementing them as non-backwards compatible language extensions or on custom research infrastructures.

This demonstration presents a re-implementation of the ownership domains type system by Aldrich et al. using Java 1.5 annotations (as opposed to language extensions) and the Eclipse open source development environment that has become popular with researchers and practitioners. Using annotations imposes a few restrictions but generally improves the adoptability of the technique through improved tool support (refactoring, syntax highlighting, etc.) and the ability to incrementally and partially annotate large code bases.

The demonstration starts by briefly reviewing how ownership domains control aliasing and ownership through source code annotations. The demonstration then features Eclipse plug-ins to automatically add reasonable defaults, incrementally and manually annotate code, typecheck the annotations, and partially annotate the Java Standard Library using external files.

When modifying a complex program, a developer often needs to understand both the code structure (static hierarchies of classes) and the execution structure (dynamic networks of communicating objects). Class diagrams extracted from source using existing tools are often sufficient to understand the code structure. However, existing static or dynamic analyses produce raw graphs of objects and relations between them that do not convey design intent or readily scale to large programs.

Since ownership domain annotations are specified by a developer, they can convey design intent related to object communication and encapsulation, e.g., encode architectural tiers as ownership domains. Moreover, these ownership domain annotations, since they impose an ownership hierarchy on a program's runtime object graph, enable a compile-time sound visualization of the system's execution structure. The visualization is both hierarchical (and thus more scalable) and conveys more design intent than flat object graphs obtained by existing static analyses that do not rely on annotations.

The last part of the demonstration discusses the intuition behind such a visualization, gives examples of the visualization using a significant example in the object-oriented programming community, JHotDraw, and illustrates the interactive features of the visualization tool.

Maintained by webmaster · Version of June 28, 2007 Valid XHTML 1.1