2013/11/19 by Shahram Esmaeilsabzali, Rupak Majumdar, Esmaeilsabzali, Shahram +5
Computer Science · #FOS: Computer and information sciences #Software Engineering (cs.SE) #cs.SE
paper · pdf · doi:10.48550/arxiv.1311.4615
arxiv created 2013/11/19 · arxiv updated 2013/11/20
Programmers using software components have to follow protocols that specify when it is legal to call particular methods with particular arguments. For example, one cannot use an iterator over a set once the set has been changed directly or through another iterator. We formalize the notion of dynamic package interfaces (DPI), which generalize state-machine interfaces for single objects, and give an algorithm to statically compute a sound abstraction of a DPI. States of a DPI represent (unbounded) sets of heap configurations and edges represent the effects of method calls on the heap. We introduce a novel heap abstract domain based on depth-bounded systems to deal with potentially unboundedly many objects and the references among them. We have implemented our algorithm and show that it is effective in computing representations of common patterns of package usage, such as relationships between viewer and label, container and iterator, and JDBC statements and cursors.