Cyber-physical systems (CPS) are subject to environmental uncertainties such
as adverse operating conditions, malicious attacks, and hardware degradation.
These uncertainties may lead to failures that put the system in a sub-optimal
or unsafe state. Systems that are resilient to such uncertainties rely on two
types of operations: (1) graceful degradation, to ensure that the system
maintains an acceptable level of safety during unexpected environmental
conditions and (2) recovery, to facilitate the resumption of normal system
functions. Typically, mechanisms for degradation and recovery are developed
independently from each other, and later integrated into a system, requiring
the designer to develop an additional, ad-hoc logic for activating and
coordinating between the two operations. In this paper, we propose a
self-adaptation approach for improving system resiliency through automated
triggering and coordination of graceful degradation and recovery. The key idea
behind our approach is to treat degradation and recovery as requirement-driven
adaptation tasks: Degradation can be thought of as temporarily weakening
original (i.e., ideal) system requirements to be achieved by the system, and
recovery as strengthening the weakened requirements when the environment
returns within an expected operating boundary. Furthermore, by treating
weakening and strengthening as dual operations, we argue that a single
requirement-based adaptation method is sufficient to enable coordination
between degradation and recovery. Given system requirements specified in signal
temporal logic (STL), we propose a run-time adaptation framework that performs
degradation and recovery in response to environmental changes. We describe a
prototype implementation of our framework and demonstrate the feasibility of
the proposed approach using a case study in unmanned underwater vehicles.Comment: Pre-print for the SEAMS '24 conference (Software Engineering for
Adaptive and Self-Managing Systems Conference