计算机科学
Android(操作系统)
系统调用
调用图
程序设计语言
人工神经网络
源代码
代码生成
操作系统
人工智能
钥匙(锁)
作者
Jingbo Yang,Wenjun Wu,Jian Ren
标识
DOI:10.1109/ijcnn54540.2023.10191527
摘要
API, namely application programming interface, can help developers implement their functions conveniently. To implement a function like dialing in Android, developers sometimes need to call many APIs organised in a special pattern, called API call sequence. However, existing methods rarely focus on code generation for API call sequence. In this paper, we introduce neural network into the application field of generating API call sequence code for Android. The purpose is realising Android code automatically generation by inputting function description. To reach this goal, we first design an API call sequence code graph which is named ACSCG to well represent the Android function code structure and then we convert the ACSCG to API call sequence. Besides, we devise an AI model based on Encoder-Decoder neural network to study the corresponding relation feature of function description and API call sequence. When finishing training the model, one can give a function description to it and generate corresponding API call sequence. After all above has been done, an algorithm is implemented to successfully convert the API call sequence into target code. To verify the efficiency of our method, we collect high quality code from Github and Gitee to build a dataset including 1000 items associated with essential functions in Android such as taking photo, file management, android browser and so on. The experiment shows that our model has a better performance in generating API call sequence code than state-of-the-art technologies.
科研通智能强力驱动
Strongly Powered by AbleSci AI