paper

Search-based Trace Diagnostic for Cyber-Physical Systems

arXiv:2406.17268

Abstract

Cyber-physical systems (CPS) development requires verifying whether system behaviors violate their requirements. This analysis often considers system behaviors expressed by execution traces and requirements expressed by signal-based temporal properties. When an execution trace violates a requirement, engineers must solve the trace diagnostic problem---they need to understand the cause of the breach. Automated trace diagnostic techniques aim to support engineers in the trace diagnostic activity. This paper proposes search-based trace diagnostic (SBTD), a novel trace diagnostic technique for CPS requirements. Unlike existing techniques, SBTD relies on evolutionary search. SBTD starts from a set of candidate diagnoses, applies an evolutionary algorithm to generate new candidate diagnoses (via mutation, recombination, and selection), and uses a fitness function to determine the qualities of these solutions. Then, a diagnostic generator step is performed to explain the cause of the trace violation. We implemented Diagnosis, an SBTD tool for signal-based temporal logic requirements expressed using the Hybrid Logic of Signals (HLS). We evaluated Diagnosis by performing 34 experiments for 17 trace-requirement combinations for property violations. We assessed the effectiveness of SBTD in producing informative diagnoses and its efficiency. Diagnosis achieved expert-aligned diagnoses for 29/34 experiments and scaled to the full HLS benchmark, whereas state-of-the-art literature remained restricted to a subset due to performance and language limitations. SBTD treats trace-checking as a black box, which makes the checker replaceable. Substituting our HLS checker for an STL monitor, e.g., RTAMT, reproduces on two requirements the diagnoses at two to three orders of magnitude lower per-check cost.

24 pages, 12 figures, 10 tables