Safety and Performance in Generated Coordination Code
Reo is able to act as a domain specific language by compiling a high-level protocol specification to coordination glue code in a target general purpose language. In the case of Java, these generated programs take advantage of optimization opportunities, but struggle to preserve Reo’s semantics. In this work, we extend the Reo compiler to support the Rust language. We show that the resulting programs implement several existing and novel performance optimizations, whilst relying on Rust’s expressive type system to preserve meaningful safety and liveness properties at compile time. Our data-oriented design facilitates flexibility, such as protocol reconfiguration at runtime, but still achieves performance in the order of handcrafted programs for non-trivial protocols.