SENov 20, 2013

Dynamic Package Interfaces - Extended Version

arXiv:1311.4934v2
Originality Incremental advance
AI Analysis

This addresses protocol violations in software development for programmers using object-oriented packages, though it is incremental as it builds on existing formal methods for protocol specification.

The paper tackles the challenge of ensuring clients follow implicit protocols in object-oriented packages, which can lead to runtime errors, by introducing dynamic package interfaces (DPI) to explicitly capture these protocols. They developed a tool that automatically computes approximate DPIs for Java packages like JDBC, HashSet, and ArrayList, leveraging monotonicity and heuristics for finite summarization.

A hallmark of object-oriented programming is the ability to perform computation through a set of interacting objects. A common manifestation of this style is the notion of a package, which groups a set of commonly used classes together. A challenge in using a package is to ensure that a client follows the implicit protocol of the package when calling its methods. Violations of the protocol can cause a runtime error or latent invariant violations. These protocols can extend across different, potentially unboundedly many, objects, and are specified informally in the documentation. As a result, ensuring that a client does not violate the protocol is hard. We introduce dynamic package interfaces (DPI), a formalism to explicitly capture the protocol of a package. The DPI of a package is a finite set of rules that together specify how any set of interacting objects of the package can evolve through method calls and under what conditions an error can happen. We have developed a dynamic tool that automatically computes an approximation of the DPI of a package, given a set of abstraction predicates. A key property of DPI is that the unbounded number of configurations of objects of a package are summarized finitely in an abstract domain. This uses the observation that many packages behave monotonically: the semantics of a method call over a configuration does not essentially change if more objects are added to the configuration. We have exploited monotonicity and have devised heuristics to obtain succinct yet general DPIs. We have used our tool to compute DPIs for several commonly used Java packages with complex protocols, such as JDBC, HashSet, and ArrayList.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes