ArduCode: Predictive Framework for Automation Engineering
Automation engineering is the task of integrating, via software, various sensors, actuators, and controls to automate a real-world process. Today, automation engineering is supported by a suite of software tools, including integrated development environments (IDEs), hardware configurators, compilers, and runtimes. These tools focus on the automation code itself but leave the automation engineer unassisted in their decision-making. This can lead to longer software development cycles due to the imperfections in the decision-making, which arise when integrating software and hardware. To address this problem, this article addresses multiple challenges often faced in automation engineering and proposes machine learning-based solutions to assist engineers tackle these challenges. We show that machine learning can be leveraged to assist the automation engineer in classifying automation code, finding similar code snippets, and reasoning about the hardware selection of sensors and actuators. We validate our architecture on two real data sets consisting of 2927 Arduino projects and 683 programmable logic controller (PLC) projects. Our results show that paragraph embedding techniques can be utilized to classify automation using code snippets with precision close to human annotation, giving an $F_{1}$ -score of 72%. Furthermore, we show that such embedding techniques can help us find similar code snippets with high accuracy. Finally, we use autoencoder models for hardware recommendation and achieve a $p\text{@}3$ of 0.79 and $p\text{@}5$ of 0.95. We also present the implementation of ArduCode in a proof-of-concept user interface integrated into an existing automation engineering system platform. Note to Practitioners—This article is motivated by the use of artificial intelligence methods to improve the efficiency and quality of the automation engineering software development process. Our goal is to develop and integrate intelligent assistants in existing automation engineering development tools to minimally disrupt existing workflows. Practitioners should be able to adapt our framework to other tools and data. Our contributions address important practical problems: 1) we address the lack of realistic data sets in automation engineering with two publicly available data sources; 2) we make the reference implementation of our algorithms publicly available on GitHub for other practitioners to have a starting point for future research; and 3) we demonstrate the integration of our framework as an add-on to an existing automation engineering toolchain.