An Intermediate Program Representation for Optimizing Stream-Based Languages

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Baumeister, Jan, Correnson, Arthur, Finkbeiner, Bernd, Scheerer, Frederik
Formato: Preprint
Publicado: 2025
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866915295963119616
author Baumeister, Jan
Correnson, Arthur
Finkbeiner, Bernd
Scheerer, Frederik
author_facet Baumeister, Jan
Correnson, Arthur
Finkbeiner, Bernd
Scheerer, Frederik
contents Stream-based runtime monitors are safety assurance tools that check at runtime whether the system's behavior satisfies a formal specification. Specifications consist of stream equations, which relate input streams, containing sensor readings and other incoming information, to output streams, representing filtered and aggregated data. This paper presents a framework for the stream-based specification language RTLola. We introduce a new intermediate representation for stream-based languages, the StreamIR, which, like the specification language, operates on streams of unbounded length; while the stream equations are replaced by imperative programs. We developed a set of optimizations based on static analysis of the specification and have implemented an interpreter and a compiler for several target languages. In our evaluation, we measure the performance of several real-world case studies. The results show that using the StreamIR framework reduces the runtime significantly compared to the existing StreamIR interpreter. We evaluate the effect of the optimizations and show that significant performance gains are possible beyond the optimizations of the target language's compiler. While our current implementation is limited to RTLola, the StreamIR is designed to accommodate other stream-based languages, enabling their interpretation and compilation into all available target languages.
format Preprint
id arxiv_https___arxiv_org_abs_2504_21458
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle An Intermediate Program Representation for Optimizing Stream-Based Languages
Baumeister, Jan
Correnson, Arthur
Finkbeiner, Bernd
Scheerer, Frederik
Logic in Computer Science
Programming Languages
Stream-based runtime monitors are safety assurance tools that check at runtime whether the system's behavior satisfies a formal specification. Specifications consist of stream equations, which relate input streams, containing sensor readings and other incoming information, to output streams, representing filtered and aggregated data. This paper presents a framework for the stream-based specification language RTLola. We introduce a new intermediate representation for stream-based languages, the StreamIR, which, like the specification language, operates on streams of unbounded length; while the stream equations are replaced by imperative programs. We developed a set of optimizations based on static analysis of the specification and have implemented an interpreter and a compiler for several target languages. In our evaluation, we measure the performance of several real-world case studies. The results show that using the StreamIR framework reduces the runtime significantly compared to the existing StreamIR interpreter. We evaluate the effect of the optimizations and show that significant performance gains are possible beyond the optimizations of the target language's compiler. While our current implementation is limited to RTLola, the StreamIR is designed to accommodate other stream-based languages, enabling their interpretation and compilation into all available target languages.
title An Intermediate Program Representation for Optimizing Stream-Based Languages
topic Logic in Computer Science
Programming Languages
url https://arxiv.org/abs/2504.21458