A Tutorial on Stream-based Monitoring
Jan Baumeister, Bernd Finkbeiner, Florian Kohn, Frederik Scheerer
TL;DR
RTLola provides a stream-based runtime monitoring framework for cyber-physical systems by mapping input data streams to derived output streams and trigger streams that report violations. It offers a hands-on tutorial that guides developers through building a detect-and-avoid monitor for a drone, covering timing semantics, dynamic and parameterized streams, and activation via after and periodic pacing. The approach is supported by a frontend that produces an intermediate representation and multiple backends for interpretation or hardware synthesis, with a formal semantics built on a dependency graph $G=\langle V,E\rangle$ to determine evaluation order and static memory bounds. It has been applied in aerospace and CPS contexts (e.g., ARTIS, Volocopter) and provides practical artifacts, tooling, and playgrounds to enable integration into real systems.
Abstract
Stream-based runtime monitoring frameworks are safety assurance tools that check the runtime behavior of a system against a formal specification. This tutorial provides a hands-on introduction to RTLola, a real-time monitoring toolkit for cyber-physical systems and networks. RTLola processes, evaluates, and aggregates streams of input data, such as sensor readings, and provides a real-time analysis in the form of comprehensive statistics and logical assessments of the system's health. RTLola has been applied successfully in monitoring autonomous systems such as unmanned aircraft. The tutorial guides the reader through the development of a stream-based specification for an autonomous drone observing other flying objects in its flight path. Each tutorial section provides an intuitive introduction, highlighting useful language features and specification patterns, and gives a more in-depth explanation of technical details for the advanced reader. Finally, we discuss how runtime monitors generated from RTLola specifications can be integrated into a variety of systems and discuss different monitoring applications.
