# Migrating from Developing Asynchronous Multi-Threading Programs to Reactive Programs in Java
## 3 Related Work
### Temporal and Type-Driven Approaches to Asynchronous Reactive Programming  
[PERSON], [PERSON], and [PERSON] tackle the challenge of constructing asynchronous programs directly from temporal specifications, proposing an approach to simplify and make asynchronous synthesis practically feasible [25]. Traditional methods for synthesizing asynchronous programs from temporal logic were highly complex and prone to exponential growth in state space, making them challenging to implement. This work introduces a novel, compact automaton construction, which avoids the exponential state blowup common in previous approaches and reduces asynchronous synthesis to synchronous synthesis. The resulting automaton has at most twice the states of the input specification, significantly improving efficiency. Furthermore, for specific temporal properties, the approach replaces automaton construction with Boolean constraint solving, further simplifying the synthesis process [25]. The study also demonstrates the practicality of their approach through experiments with a prototype tool, BAS, which incorporates their construction method along with existing synthesis solvers. BAS efficiently handles complex specifications that previously required impractical computation times. For example, it synthesizes an asynchronous arbiter specification within seconds, while previous methods took over eight hours. These advancements make asynchronous synthesis a feasible alternative for constructing reactive systems, broadening the applicability of automated synthesis in real-world asynchronous and distributed system design [25]. [PERSON], [PERSON], and [PERSON] present Async Rattus, a functional reactive programming (FRP) language embedded in Haskell, designed to handle asynchronous computations in a type-safe and efficient manner using modal types [26]. Async Rattus extends the Rattus FRP language by introducing dynamic, local clocks for asynchronous subsystems, allowing components to operate independently rather than synchronously under a global clock. This approach reduces inefficiencies, particularly in applications where components react to distinct events, such as graphical user interfaces. Async Rattus employs two modal types to track delayed and stable computations, preventing space leaks and ensuring causality. Its Haskell compiler plugin automates type-checking for clock dependencies while enabling developers to leverage Haskell's extensive ecosystem. The effectiveness of Async Rattus is demonstrated through various examples, including an interactive console application that dynamically updates values based on user input without relying on synchronous timing. The prototype shows that Async Rattus maintains low memory overhead and effectively mitigates space leaks common in asynchronous FRP, supporting more complex, concurrent applications within Haskell's functional paradigm [26]. The implementation highlights Async Rattus's potential for broader adoption in real-world scenarios that demand scalable, event-driven processing with minimal manual configuration. However, both studies acknowledge certain limitations. [PERSON] et al. note that while their method significantly reduces complexity, it may not be universally applicable to all classes of temporal properties, requiring further research to extend its general adoption. Similarly, [PERSON] et al. recognize that the introduction of dynamic, local clocks in Async Rattus, while beneficial for flexibility, can introduce additional complexity in the reasoning about time-dependent behaviors, potentially complicating the development process. These approaches offer promising advancements in asynchronous reactive programming but careful consideration of their applicability and potential trade-offs is essential in practical implementations [25; 26]. While valuable insights into the performance and viability of reactive solutions have been provided by these studies, much of the existing research focuses on evaluating specific frameworks or comparing asynchronous and reactive models in isolated contexts.