English
 
Help Privacy Policy Disclaimer
  Advanced SearchBrowse

Item

ITEM ACTIONSEXPORT

Released

Paper

Dynamic Package Interfaces - Extended Version

MPS-Authors
/persons/resource/persons180295

Esmaeilsabzal,  Shahram
Group R. Majumdar, Max Planck Institute for Software Systems, Max Planck Society;

/persons/resource/persons144534

Majumdar,  Rupak
Group R. Majumdar, Max Planck Institute for Software Systems, Max Planck Society;

External Resource
No external resources are shared
Fulltext (restricted access)
There are currently no full texts shared for your IP range.
Fulltext (public)

arXiv:1311.4934.pdf
(Preprint), 277KB

Supplementary Material (public)
There is no public supplementary material available
Citation

Esmaeilsabzal, S., Majumdar, R., Wies, T., & Zufferey, D. (2013). Dynamic Package Interfaces - Extended Version. Retrieved from http://arxiv.org/abs/1311.4934.


Cite as: https://hdl.handle.net/11858/00-001M-0000-0028-110B-B
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 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.