一种用于优化基于流的语言的中间程序表示
An Intermediate Program Representation for Optimizing Stream-Based Languages
AI总结:
本研究提出面向流语言的中间表示StreamIR及配套优化、解释器与多目标编译器,在RTLola语言的真实案例中显著降低运行时,且可扩展至其他流语言。
摘要:
基于流的运行时监控器是一类安全保障工具,用于在运行时检查系统行为是否满足形式化规约。规约由流方程构成,这些方程将包含传感器读数及其他输入信息的输入流,与代表经过过滤、聚合的数据的输出流关联起来。本文提出了一个面向基于流的规约语言RTLola的框架。我们为基于流的语言引入了一种新的中间表示StreamIR(流中间表示),它和规约语言一样,处理长度无界的流;同时流方程被替换为命令式程序。我们基于对规约的静态分析开发了一组优化方法,并实现了一个解释器以及面向多种目标语言的编译器。在评估中,我们测试了多个真实案例研究的性能。结果显示,使用StreamIR框架相比现有的StreamIR解释器,运行时间显著降低。我们评估了这些优化的效果,证明除了目标语言编译器的优化之外,还能获得显著的性能提升。虽然我们当前的实现仅支持RTLola,但StreamIR的设计可适配其他基于流的语言,支持对这些语言进行解释并编译到所有可用的目标语言。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。