🤖 AI Summary
This work addresses the debugging gap between high-level functional reactive programming (FRP) abstractions and their low-level C/C++ implementations in Emfrp, where debugging traditionally requires inspecting generated code. To bridge this gap, the authors propose a multi-modal debugging framework that precisely maps Emfrp language constructs to their corresponding locations in compiled code using source-code mapping techniques. The framework integrates multi-level debugging interfaces with embedded systems, enabling coordinated debugging across the FRP abstraction layer and platform-specific I/O layers. It maintains compatibility with conventional debuggers such as GDB and supports cross-language debugging. Experimental evaluation on the ESP32 microcontroller demonstrates that the approach significantly improves debugging efficiency for FRP-based embedded applications.
📝 Abstract
Emfrp is a functional reactive programming (FRP) language designed for small-scale embedded systems. Time-varying values are the primary abstraction mechanism in FRP and enable concise descriptions of reactive behavior. In practice, however, Emfrp programs are compiled into C and combined with platform-dependent input/output components written in C or C++. Consequently, developers must debug the resulting mixed C/C++ program using conventional debuggers such as GDB, even though the application logic is written in Emfrp. This situation creates an abstraction gap between the source-level FRP program and the executable system. This paper presents a multi-mode debugging framework for Emfrp-based embedded applications. The framework supports debugging at the level of Emfrp abstractions while also allowing inspection of platform-specific C/C++ I/O code. Our approach uses a source code mapping technique that relates Emfrp constructs to corresponding locations in the compiled program. A case study on an ESP32 microcontroller using representative debugging scenarios demonstrates improved debugging efficiency.