A Rewriting Framework for Interacting Cyber-Physical Agents

Benjamin Lion,Farhad Arbab,Carolyn Talcott
DOI: https://doi.org/10.48550/arXiv.2206.03997
2022-08-02
Abstract:The analysis of cyber-physical systems (CPS) is challenging due to the large state space and the continuous changes occurring in their constituent parts. Design practices favor modularity to help reducing this complexity. In a previous work, we proposed a discrete semantic model for CPS that captures both cyber and physical aspects as streams of discrete observations, which ultimately form the behavior of a component. This semantic model is denotational and compositional, where each composition operator algebraically models an interaction between a pair of components. In this paper, we propose a specification of components as rewrite systems. The specification is operational and executable, and we study conditions for its semantics as components to be compositional. We demonstrate our framework by modeling a coordination of robots moving on a shared field. We show that our system of robots can be coordinated by a protocol in order to exhibit a desired emerging behavior. We use an implementation of our framework in Maude to give practical results.
Logic in Computer Science
What problem does this paper attempt to address?
The problem that this paper attempts to solve is: **How to establish a rewrite framework for interactive Cyber - Physical Agents to deal with the concurrency and state - space explosion problems in complex systems**. Specifically, the paper aims to solve these problems through the following aspects: 1. **Modular Design**: In order to simplify the analysis of complex systems, the paper proposes a semantic model based on modularity. Each module (component) can be independently designed and analyzed, thereby reducing the overall system complexity. 2. **Concurrency Handling**: Cyber - physical systems are essentially concurrent, and the decision of time will affect the changes in the physical environment. By introducing an exogenous coordination mechanism, the paper treats concurrent protocols as independent modules, reducing the design complexity. 3. **Behavior Modeling**: The paper proposes to model the behavior of components as rewrite systems and studies the combinatorial properties of these systems. This enables the system to dynamically combine components at runtime and maintain a relatively small state - space. 4. **Example Application**: A specific example is implemented through Maude, showing how to use the proposed framework to coordinate the movement of two robots in a shared area and avoid the occurrence of deadlock situations. ### Main Contributions 1. **Operational Specification**: An operational specification for describing components as rewrite systems is proposed. 2. **Combination Conditions**: The conditions for making the semantics of rewrite systems compositional are studied. 3. **Incremental Implementation**: An incremental, runtime version of the combination is implemented. 4. **Case Study**: Through the case of two coordinated robots, it is shown how to incrementally analyze the system design using Maude specifications. ### Specific Content #### 1. Introduction The paper first introduces the characteristics of Cyber - physical systems (CPS), namely their concurrency and the uncertainty of physical events. In order to simplify the analysis of such systems, the author proposes the idea of modular design and introduces an external coordination mechanism to handle concurrency. #### 2. Semantic Model: Component Algebra The author reviews the semantic model proposed in previous work, in which each component consists of a set of events (interface) and behavior. Behavior is a set of time - event streams (TESs), which defines the possible observation results of components over time. #### 3. System and Combinatorial Semantics This section introduces how to model the operational specification of components as a rewrite logic system and proves its combinatorial properties. In this way, the validity of component behavior can be gradually verified. #### 4. Application Finally, the author implements a specific example through Maude, showing how to use the proposed framework to coordinate the movement of two robots in a shared area and avoid the occurrence of deadlock situations. This not only verifies the validity of the theory but also provides a reference for practical applications. In conclusion, by proposing a new rewrite framework, this paper solves the problems of concurrency and state - space explosion in cyber - physical systems and provides a new method for the analysis and design of complex systems.