M3: Semantic API Migrations

08/27/2020
by   Bruce Collie, et al.
0

Library migration is a challenging problem, where most existing approaches rely on prior knowledge. This can be, for example, information derived from changelogs or statistical models of API usage. This paper addresses a different API migration scenario where there is no prior knowledge of the target library. We have no historical changelogs and no access to its internal representation. To tackle this problem, this paper proposes a novel approach (M^3), where probabilistic program synthesis is used to semantically model the behavior of library functions. Then, we use an SMT-based code search engine to discover similar code in user applications. These discovered instances provide potential locations for API migrations. We evaluate our approach against 7 well-known libraries from varied application domains, learning correct implementations for 94 functions. Our approach is integrated with standard compiler tooling, and we use this integration to evaluate migration opportunities in 9 existing C/C++ applications with over 1MLoC. We discover over 7,000 instances of these functions, of which more than 2,000 represent migration opportunities.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/22/2023

Recommending Analogical APIs via Knowledge Graph Embedding

Library migration, which re-implements the same software behavior by usi...
research
05/06/2021

Migrating Client Code without Change Examples

API developers evolve software libraries to fix bugs, add new features, ...
research
12/12/2018

A4: Automatically Assisting Android API Migrations Using Code Examples

The fast-paced evolution of Android APIs has posed a challenging task fo...
research
02/12/2021

SOAR: A Synthesis Approach for Data Science API Refactoring

With the growth of the open-source data science community, both the numb...
research
06/02/2019

On the Use of Information Retrieval to Automate the Detection of Third-Party Java Library Migration at the Method Level

The migration process between different third-party libraries is hard, c...
research
11/21/2022

Refactoring = Substitution + Rewriting

We present an approach to describing refactorings that abstracts away fr...
research
04/25/2021

RULF: Rust Library Fuzzing via API Dependency Graph Traversal

Robustness is a key concern for Rust library development because Rust pr...

Please sign up or login with your details

Forgot password? Click here to reset