K-RAPID: A Formal Executable Semantics of the RAPID Robot Programming Language

Zichen Wang,Jingyi Wang,Fu Song,Kun Wang,Hongyi Pu,Peng Cheng
DOI: https://doi.org/10.1145/3626205.3659149
2024-01-01
Abstract:Industrial robots are widely used in industrial production as mechanical devices. It is essential to guarantee that their control software operates safely and properly, as any functional or security-related defects may lead to serious incidents. However, industrial robots are programmed mostly in proprietary languages varying from vendor to vendor, making it challenging to formally analyze their correctness in a unified way. One of the most representative robot programming languages is the RAPID language proposed by ABB Robotics. In this paper, we present K-RAPID, a formal executable semantics of RAPID in the K-Framework (K). K-RAPID is developed according to the official ABB documentation and defined in a generic extensible manner. It can be used either for validating the correctness of compiler implementation or analyzing the control programs written in RAPID. We evaluate the correctness of K-RAPID by executing 563 test programs collected from multiple sources and comparing the results against the official robot simulation environment RobotStudio. The results suggest that K-RAPID covers the core features of RAPID correctly. Moreover, we show how we could apply K-RAPID to verify RAPID programs using LTL model checking and to provide a formal specification of RAPID to uncover inappropriate behaviors in the programs.
What problem does this paper attempt to address?