Studying and Leveraging API Usage Patterns
dc.contributor.author | Venkatanarayanan, Sruthi | |
dc.date.accessioned | 2022-09-29T13:51:04Z | |
dc.date.available | 2022-09-29T13:51:04Z | |
dc.date.issued | 2022-09-29 | |
dc.date.submitted | 2022-09-24 | |
dc.description.abstract | Software projects make use of libraries extensively. Libraries have intended API surfaces—sets of exposed library interfaces that library developers expect clients to use. However, in practice, clients only use small fractions of intended API surfaces of libraries. Clients also use libraries in unexpected ways sometimes. Understanding usage patterns of library APIs by clients is beneficial to both client and library developers—targeting issues such as version upgrades, breaking changes and software bloating. We have implemented a tool to study both static and dynamic interactions between clients, the libraries they use, and those libraries’ direct dependencies. We use this tool to carry out a detailed study of API usage patterns on 90 clients and 11 libraries. We present a classification framework for developers to classify API uses. We then describe two additional developer-focussed applications of the data that our tool produces: a secondary visualization tool VizAPI, as well as the concept of library fission. Conceivably, VizAPI can allow client and library developers to answer the following queries about the interaction of their code and the libraries they depend on: Will my client code be affected by breaking changes in library APIs? Which APIs in my library’s source code are commonly used by clients? The concept of library fission, by which we mean the splitting of libraries into sub-modules, is based on the usage patterns that we observe. This can potentially help library developers release backward compatible versions of their libraries. It could also help client developers isolate breaking changes and reduce the likelihood of vulnerabilities and version conflicts that may be introduced through direct or transitive dependencies. | en |
dc.identifier.uri | http://hdl.handle.net/10012/18840 | |
dc.language.iso | en | en |
dc.pending | false | |
dc.publisher | University of Waterloo | en |
dc.relation.uri | https://github.com/SruthiVenkat/calls-across-libs | en |
dc.relation.uri | https://doi.org/10.5281/zenodo.7023872 | en |
dc.relation.uri | https://github.com/SruthiVenkat/api-visualization-tool | en |
dc.subject | static program analysis | en |
dc.subject | dynamic program analysis | en |
dc.subject | API usage | en |
dc.subject | software evolution | en |
dc.subject | software maintenance | en |
dc.title | Studying and Leveraging API Usage Patterns | en |
dc.type | Master Thesis | en |
uws-etd.degree | Master of Mathematics | en |
uws-etd.degree.department | David R. Cheriton School of Computer Science | en |
uws-etd.degree.discipline | Computer Science | en |
uws-etd.degree.grantor | University of Waterloo | en |
uws-etd.embargo.terms | 0 | en |
uws.contributor.advisor | Lam, Patrick | |
uws.contributor.affiliation1 | Faculty of Mathematics | en |
uws.peerReviewStatus | Unreviewed | en |
uws.published.city | Waterloo | en |
uws.published.country | Canada | en |
uws.published.province | Ontario | en |
uws.scholarLevel | Graduate | en |
uws.typeOfResource | Text | en |