Modal Reactors

Author(s): Alexander Schulz-Rosengarten, Reinhard von Hanxleden,Marten Lohstroh, Soroush Bateni, Edward A. Lee

Abstract
Complex software systems often feature distinct modes of operation, each designed to handle a particular scenario that may require the system to respond in a certain way. Breaking down system behavior into mutually exclusive modes and discrete transitions between modes is a commonly used strategy to reduce implementation complexity and promote code readability. However, such capabilities often come in the form of self-contained domain specific languages or language-specific frameworks. The work in this paper aims to bring the advantages of modal models to mainstream programming languages, by following the polyglot coordination approach of Lingua Franca (LF), in which verbatim target code (e.g., C, C++, Python, Typescript, or Rust) is encapsulated in composable reactive components called reactors. Reactors can form a dataflow network, are triggered by timed as well as sporadic events, execute concurrently, and can be distributed across nodes on a network. With modal models in LF, we introduce a lean extension to the concept of reactors that enables the coordination of reactive tasks based on modes of operation. The implementation of modal reactors outlined in this paper generalizes to any LF-supported language with only modest modifications to the generic runtime system.

Electronic Downloads

Citation Formats

  • APA
                    
    Alexander Schulz-Rosengarten, Reinhard von Hanxleden,Marten Lohstroh, Soroush Bateni, Edward A. Lee. (2023). Modal Reactors. In arXiv:2301.09597 [cs.PL]                      
                    
                    
  • MLA
                    
    Alexander Schulz-Rosengarten, Reinhard von Hanxleden,Marten Lohstroh, Soroush Bateni, Edward A. Lee. "Modal Reactors." 2023. arXiv:2301.09597 [cs.PL],                       
                    
                    
  • Chicago
                    
    Alexander Schulz-Rosengarten, Reinhard von Hanxleden,Marten Lohstroh, Soroush Bateni, Edward A. Lee. "Modal Reactors." 2023. In arXiv:2301.09597 [cs.PL]                      
                    
                    
  • BibTeX
                        
    @article{SchulzRosengartenEtAlEtAl:23:Modes,
    	author = {Alexander Schulz-Rosengarten, Reinhard von Hanxleden,Marten Lohstroh, Soroush Bateni, Edward A. Lee},
    	title = {Modal Reactors},
    journal = {arXiv:2301.09597 [cs.PL]},
    month = {January},
    year = {2023},
    abstract = {Complex software systems often feature distinct modes of operation, each designed to handle a particular scenario that may require the system to respond in a certain way. Breaking down system behavior into mutually exclusive modes and discrete transitions between modes is a commonly used strategy to reduce implementation complexity and promote code readability. However, such capabilities often come in the form of self-contained domain specific languages or language-specific frameworks. The work in this paper aims to bring the advantages of modal models to mainstream programming languages, by following the polyglot coordination approach of Lingua Franca (LF), in which verbatim target code (e.g., C, C++, Python, Typescript, or Rust) is encapsulated in composable reactive components called reactors. Reactors can form a dataflow network, are triggered by timed as well as sporadic events, execute concurrently, and can be distributed across nodes on a network. With modal models in LF, we introduce a lean extension to the concept of reactors that enables the coordination of reactive tasks based on modes of operation. The implementation of modal reactors outlined in this paper generalizes to any LF-supported language with only modest modifications to the generic runtime system.},
    URL = {https://arxiv.org/abs/2301.09597}}