arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1507.07306cs.SE
收藏

从字节码中学习API用法:一种统计方法

Learning API Usages from Bytecode: A Statistical Approach

Tam The Nguyen, Hung Viet Pham, Phong Minh Vu, Tung Thanh Nguyen

摘要:

在开发移动应用程序时,程序员严重依赖标准API框架和库。然而,由于移动系统API框架的快速变化性质、API使用的复杂性、文档的不足以及源代码示例的不可用,学习和使用这些API通常具有挑战性。在本文中,我们提出了一种新的方法来学习Android移动应用程序的字节码API的使用。我们的核心贡献包括:i)ARUS,API使用场景的基于图的表示; ii)HAPI,API使用的统计生成模型;以及iii)三种算法,用于从应用的字节码提取ARUS,基于从ARUS提取的方法调用序列训练HAPI,以及使用训练的HAPI在代码完成引擎中推荐方法调用。我们的实证评估表明,我们的方法可以学习有用的API使用模型,可以提供比基线n-gram模型更高准确度的建议。

英文摘要:

When developing mobile apps, programmers rely heavily on standard API frameworks and libraries. However, learning and using those APIs is often challenging due to the fast-changing nature of API frameworks for mobile systems, the complexity of API usages, the insufficiency of documentation, and the unavailability of source code examples. In this paper, we propose a novel approach to learn API usages from bytecode of Android mobile apps. Our core contributions include: i) ARUS, a graph-based representation of API usage scenarios; ii) HAPI, a statistical, generative model of API usages; and iii) three algorithms to extract ARUS from apps' bytecode, to train HAPI based on method call sequences extracted from ARUS, and to recommend method calls in code completion engines using the trained HAPI. Our empirical evaluation suggests that our approach can learn useful API usage models which can provide recommendations with higher levels of accuracy than the baseline n-gram model.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑