一句话:基于真实用户查询,提出三组件工具自动推荐驱动库、推断接口配置并生成用法模式,辅助 Arduino 编程。
为 Arduino 编写代码面临独特挑战:开发者需要掌握 Arduino 控制器与 I/O 硬件之间接口配置的硬件知识,为 I/O 硬件挑选合适的驱动库,并遵循该库特定的使用模式。本文基于对 Arduino 论坛真实用户查询的研究,提出 ArduinoProg 来应对这些挑战。该工具由三个组件构成:Library Retriever 利用基于向量的相似度匹配,从查询中识别出的 I/O 硬件检索相关库名;Configuration Classifier 依据各库的方法定义预测 I/O 硬件与 Arduino 控制器之间的接口配置;Pattern Generator 使用序列到序列(seq2seq)深度学习模型生成库的使用模式。作者使用真实世界查询对 ArduinoProg 进行了评估,结果表明各组件能够生成准确且有价值的建议,从而指导开发者编写 Arduino 代码。
Writing code for Arduino poses unique challenges. A developer 1) needs hardware-specific knowledge about the interface configuration between the Arduino controller and the I/Ohardware, 2) identifies a suitable driver library for the I/O hardware, and 3) follows certain usage patterns of the driver library in order to use them properly. In this work, based on a study of real-world user queries posted in the Arduino forum, we propose ArduinoProg to address such challenges. ArduinoProg consists of three components, i.e., Library Retriever, Configuration Classifier, and Pattern Generator. Given a query, Library Retriever retrieves library names relevant to the I/O hardware identified from the query using vector-based similarity matching. Configuration Classifier predicts the interface configuration between the I/O hardware and the Arduino controller based on the method definitions of each library. Pattern Generator generates the usage pattern of a library using a sequence-to-sequence deep learning model. We have evaluated ArduinoProg using real-world queries, and our results show that the components of ArduinoProg can generate accurate and useful suggestions to guide developers in writing Arduino code. Demo video: bit.ly/3Y3aeBe Tool: https://huggingface.co/spaces/imamnurby/ArduinoProg Code and data: https://github.com/imamnurby/ArduProg