Dynamic Package Interfaces - Extended Version
Shahram Esmaeilsabzali, Rupak Majumdar, Thomas Wies, Damien Zufferey

TL;DR
This paper introduces dynamic package interfaces (DPI), a formalism for explicitly capturing and analyzing the protocols of object-oriented packages to prevent violations and runtime errors, using automated tools and abstractions.
Contribution
The paper presents a novel formalism for dynamic package interfaces and a tool that automatically computes approximations of these interfaces for complex Java packages.
Findings
Successfully computed DPIs for Java packages like JDBC, HashSet, ArrayList.
DPIs summarize unbounded configurations finitely using monotonicity.
Heuristics enable succinct and general DPI representations.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Software Engineering Research · Formal Methods in Verification
