The safety of cyber-physical systems rests on the correctness of their monitoring mechanisms. This is problematic if the specification of the monitor is implemented manually or interpreted by unreliable software. We present a verifying compiler that translates specifications given in the stream-based monitoring language Lola to implementations in Rust. The generated code contains verification annotations that enable the Viper toolkit to automatically prove functional correctness, absence of memory faults, and guaranteed termination. The compiler parallelizes the evaluation of different streams in the monitor based on a dependency analysis of the specification. We present encouraging experimental results obtained with monitor specifications found in the literature. For every specification, our approach was able to either produce a correctness proof or to uncover errors in the specification.
翻译:网络物理系统的安全取决于其监测机制的正确性,如果监测器的规格是人工执行或由不可靠的软件解释的,则有问题。我们提出了一个核查汇编器,将流基监测语言Lola中的规格翻译给Rust的实施工作。生成的编码载有核查说明,使Viper工具包能够自动证明功能正确、没有内存缺陷和有保证的终止。编译器根据对规格的依赖性分析对监测器中不同流进行的评价同时进行。我们用文献中发现的监测规格提供令人鼓舞的实验结果。对于每一种规格,我们的方法都能够提供正确性证明或发现规格中的错误。