Skip to main content

Mining API patterns as partial orders from source code: From usage scenarios to specifications

Publication ,  Conference
Acharya, M; Xie, T; Pei, J; Xu, J
Published in: 6th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE 2007
December 1, 2007

A software system interacts with third-party libraries through various APIs. Using these library APIs often needs tofollow certain usage patterns. Furthermore, ordering rules (specifications) exist between APIs, and these rules govern the secure and robust operation of the system using these APIs. But these patterns and rules may not be well documented by the API developers. Previous approaches mine frequent association rules, itemsets, or subsequences that capture API call patterns shared by API client code. However, these frequent API patterns cannot completely capture some useful orderings shared by APIs, especially when multiple APIs are involved across different procedures. In this paper, we present a framework to automatically extract usage scenarios among user-specified APIs as partial orders, directly from the source code (API client code). We adapt a model checker to generate interprocedural control-flow-sensitive static traces related to the APIs of interest. Different API usage scenarios are extracted from the static traces by our scenario extraction algorithm and fed to a miner. The miner summarizes different usage scenarios as compact partial orders. Specifications are extracted from the frequent partial orders using our specification extraction algorithm. Our experience of applying the framework on 72 X11 clients with 200K LOC in total has shown that theextracted API partial orders are useful in assisting effective API reuse and checking. Copyright 2007 ACM.

Duke Scholars

Altmetric Attention Stats
Dimensions Citation Stats

Published In

6th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE 2007

DOI

Publication Date

December 1, 2007

Start / End Page

25 / 34
 

Citation

APA
Chicago
ICMJE
MLA
NLM
Acharya, M., Xie, T., Pei, J., & Xu, J. (2007). Mining API patterns as partial orders from source code: From usage scenarios to specifications. In 6th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE 2007 (pp. 25–34). https://doi.org/10.1145/1287624.1287630
Acharya, M., T. Xie, J. Pei, and J. Xu. “Mining API patterns as partial orders from source code: From usage scenarios to specifications.” In 6th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE 2007, 25–34, 2007. https://doi.org/10.1145/1287624.1287630.
Acharya M, Xie T, Pei J, Xu J. Mining API patterns as partial orders from source code: From usage scenarios to specifications. In: 6th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE 2007. 2007. p. 25–34.
Acharya, M., et al. “Mining API patterns as partial orders from source code: From usage scenarios to specifications.” 6th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE 2007, 2007, pp. 25–34. Scopus, doi:10.1145/1287624.1287630.
Acharya M, Xie T, Pei J, Xu J. Mining API patterns as partial orders from source code: From usage scenarios to specifications. 6th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE 2007. 2007. p. 25–34.

Published In

6th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, ESEC/FSE 2007

DOI

Publication Date

December 1, 2007

Start / End Page

25 / 34