Contract-Based Consistency and Availability Analysis for Distributed Cyber-Physical Systems
Abstract
Mapping critical applications to distributed cyberphysical systems exposes fundamental trade-offs between consistency and availability. A component may either become unavailable and unresponsive until it can guarantee consistency, i.e., agreement on a shared state, or deliver a prompt response at the risk of inconsistencies. We introduce a compositional timing verification and repair framework that can reason about these trade-offs and appropriately associate the physical execution and communication latencies of an implementation with the logical ordering of events in the application domain. We model the system function in terms of a dependency graph, capturing causal dependencies between events, and devise appropriate graph decompositions to efficiently check whether the timing requirements, formalized as assume-guarantee contracts, are satisfied by an implementation. If this is not the case, we optimally tune a set of inconsistency and unavailability bounds associated with the implementation components to achieve feasibility with minimal performance degradation. While our case studies use the reactor model of computation, the underlying dependencygraph abstraction and timing-contract formulation generalize to other event-driven coordination models. We illustrate the framework on an automatic emergency braking system and a multi-drone coordination scenario.