Efficient Online Monitoring and Formula Synthesis with Past STL

In online monitoring, it is crucial to detect a deviation from normal behavior as soon as it occurs. During online monitoring, the system traces are checked against monitoring rules in real-time to detect such deviations. In general, the rules are defined as boundary conditions by the experts of the monitored system. In this work, we study the problem of synthesizing online monitoring rules in the form of temporal logic formulas in an automated way. We describe the monitoring rules as past time signal temporal logic (ptSTL) formulas and propose an algorithm to synthesize such formulas from a given set of labeled system traces. The algorithm searches the formula space for a predefined number of operators in an efficient way and produce the best formula representing a monitoring rule. In addition, we improve online STL monitoring algorithm to efficiently compute a quantitative valuation for piecewise-constant signals from ptSTL formulas, thus, reduce the overhead of the the real-time computation.