Automating Arduino programming: From hardware setups to sample source code generation
An embedded system is a system consisting of software code, controller hardware, and I/O (Input/Output) hardware that performs a specific task. Developing an embedded system presents several challenges. First, the development often involves configuring hardware that requires domain-specific knowledg...
Saved in:
Main Authors: | , , |
---|---|
Format: | text |
Language: | English |
Published: |
Institutional Knowledge at Singapore Management University
2023
|
Subjects: | |
Online Access: | https://ink.library.smu.edu.sg/sis_research/8300 https://ink.library.smu.edu.sg/context/sis_research/article/9303/viewcontent/MSR2023ArduinoProg_av.pdf |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Institution: | Singapore Management University |
Language: | English |
id |
sg-smu-ink.sis_research-9303 |
---|---|
record_format |
dspace |
spelling |
sg-smu-ink.sis_research-93032023-12-05T03:23:47Z Automating Arduino programming: From hardware setups to sample source code generation IMAM NUR BANI YUSUF, DIYANAH BINTE ABDUL JAMAL, JIANG, Lingxiao An embedded system is a system consisting of software code, controller hardware, and I/O (Input/Output) hardware that performs a specific task. Developing an embedded system presents several challenges. First, the development often involves configuring hardware that requires domain-specific knowledge. Second, the library for the hardware may have API usage patterns that must be followed. To overcome such challenges, we propose a framework called ArduinoProg towards the automatic generation of Arduino applications. ArduinoProg takes a natural language query as input and outputs the configuration and API usage pattern for the hardware described in the query. Motivated by our findings on the characteristics of real-world queries posted in the official Arduino forum, we formulate ArduinoProg as three components, i.e., Library Retriever, Configuration Classifier, and Pattern Generator. First, Library Retriever preprocesses the input query and retrieves a set of relevant libraries using either lexical matching or vector-based similarity. Second, given Library Retriever's output, Configuration Classifier infers the hardware configuration by classifying the method definitions found in the library's implementation files into a hardware configuration class. Third, Pattern Generator also takes Library Retriever's output as input and leverages a sequence-to-sequence model to generate the API usage pattern. Having instantiated each component of ArduinoProg with various machine learning models, we have evaluated ArduinoProg on real-world queries. Library Retriever achieves a Precision@K range of 44.0%-97.1%; Configuration Classifier achieves an Area under the Receiver Operating Characteristics curve (AUC) of 0.79-0.95; Pattern Generator yields a Normalized Discounted Cumulative Gain (NDCG)@K of 0.45-0.73. Such results indicate that ArduinoProg can generate practical and useful hardware configurations and API usage patterns to guide developers in writing Arduino code. 2023-05-01T07:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/8300 info:doi/10.1109/MSR59073.2023.00069 https://ink.library.smu.edu.sg/context/sis_research/article/9303/viewcontent/MSR2023ArduinoProg_av.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University api recommendation arduino code generation deep learning embedded system information retrieval Software Engineering |
institution |
Singapore Management University |
building |
SMU Libraries |
continent |
Asia |
country |
Singapore Singapore |
content_provider |
SMU Libraries |
collection |
InK@SMU |
language |
English |
topic |
api recommendation arduino code generation deep learning embedded system information retrieval Software Engineering |
spellingShingle |
api recommendation arduino code generation deep learning embedded system information retrieval Software Engineering IMAM NUR BANI YUSUF, DIYANAH BINTE ABDUL JAMAL, JIANG, Lingxiao Automating Arduino programming: From hardware setups to sample source code generation |
description |
An embedded system is a system consisting of software code, controller hardware, and I/O (Input/Output) hardware that performs a specific task. Developing an embedded system presents several challenges. First, the development often involves configuring hardware that requires domain-specific knowledge. Second, the library for the hardware may have API usage patterns that must be followed. To overcome such challenges, we propose a framework called ArduinoProg towards the automatic generation of Arduino applications. ArduinoProg takes a natural language query as input and outputs the configuration and API usage pattern for the hardware described in the query. Motivated by our findings on the characteristics of real-world queries posted in the official Arduino forum, we formulate ArduinoProg as three components, i.e., Library Retriever, Configuration Classifier, and Pattern Generator. First, Library Retriever preprocesses the input query and retrieves a set of relevant libraries using either lexical matching or vector-based similarity. Second, given Library Retriever's output, Configuration Classifier infers the hardware configuration by classifying the method definitions found in the library's implementation files into a hardware configuration class. Third, Pattern Generator also takes Library Retriever's output as input and leverages a sequence-to-sequence model to generate the API usage pattern. Having instantiated each component of ArduinoProg with various machine learning models, we have evaluated ArduinoProg on real-world queries. Library Retriever achieves a Precision@K range of 44.0%-97.1%; Configuration Classifier achieves an Area under the Receiver Operating Characteristics curve (AUC) of 0.79-0.95; Pattern Generator yields a Normalized Discounted Cumulative Gain (NDCG)@K of 0.45-0.73. Such results indicate that ArduinoProg can generate practical and useful hardware configurations and API usage patterns to guide developers in writing Arduino code. |
format |
text |
author |
IMAM NUR BANI YUSUF, DIYANAH BINTE ABDUL JAMAL, JIANG, Lingxiao |
author_facet |
IMAM NUR BANI YUSUF, DIYANAH BINTE ABDUL JAMAL, JIANG, Lingxiao |
author_sort |
IMAM NUR BANI YUSUF, |
title |
Automating Arduino programming: From hardware setups to sample source code generation |
title_short |
Automating Arduino programming: From hardware setups to sample source code generation |
title_full |
Automating Arduino programming: From hardware setups to sample source code generation |
title_fullStr |
Automating Arduino programming: From hardware setups to sample source code generation |
title_full_unstemmed |
Automating Arduino programming: From hardware setups to sample source code generation |
title_sort |
automating arduino programming: from hardware setups to sample source code generation |
publisher |
Institutional Knowledge at Singapore Management University |
publishDate |
2023 |
url |
https://ink.library.smu.edu.sg/sis_research/8300 https://ink.library.smu.edu.sg/context/sis_research/article/9303/viewcontent/MSR2023ArduinoProg_av.pdf |
_version_ |
1784855625970221056 |