RT-MaC: Runtime Monitoring and Checking of Quantitative and Probabilistic Properties

Usa Sammapun, Insup Lee, Oleg Sokolsky

TL;DR

This paper introduces RT-MaC, an extension to the MaC runtime verification framework, enabling the checking of quantitative (timeliness) and probabilistic properties of real-time systems. By incorporating time-bound temporal operators and statistical hypothesis testing, RT-MaC offers a more comprehensive approach to ensuring system correctness at runtime with minimal overhead.

What Problem Does This Paper Address?

Ensuring the correctness of real-time systems is crucial, encompassing not just computational accuracy but also timeliness (meeting deadlines) and reliability (consistent performance). While runtime verification (RV) offers a practical way to check system correctness during execution, existing RV tools primarily focus on qualitative properties, often neglecting timeliness and reliability. This leaves a gap in comprehensively verifying the behavior of real-time systems in dynamic environments. The authors aim to bridge this gap by extending an existing RV tool, MaC, to handle quantitative and probabilistic specifications, which are essential for real-time system assurance.

Methods

The core contribution is the extension of the MaC framework, named RT-MaC. This involves:

  • Quantitative Property Specification: Introducing time-bound temporal operators (e.g., [e1, e2){≤d}, [e1, e2){<d}, [e1, e2){=d}) to MEDL (Meta-Event Definition Language). These operators allow specifying time limits within which events must occur or conditions must hold, moving beyond simple event sequencing to include temporal constraints. This makes the language similar to Metric Temporal Logic (MTL).
  • Time-Driven Evaluation: Implementing an "event-driven" and "time-driven" evaluation mechanism. While traditional RV often reacts only to computation changes, RT-MaC also reacts to time changes. This is achieved by using timers that trigger evaluations when time-bound conditions are met or exceeded, even if no new events occur.
  • Probabilistic Property Specification: Adding probabilistic operators (prob(Op, eexp)) to RT-MEDL. These allow specifying properties related to the probability of events or conditions occurring.
  • Statistical Hypothesis Testing: For probabilistic properties, RT-MaC employs sequential hypothesis testing. This statistical technique allows for real-time decision-making on whether a probabilistic property is satisfied, not satisfied, or requires further observation, providing confidence intervals for the results. This approach is particularly suited for runtime verification where control over execution paths is limited.

Datasets

Not discussed in the paper. The evaluation is performed on experiments designed to measure communication costs and instrumentation overhead.

Key Insights and Ideas

  • Bridging the RV Gap: The paper effectively demonstrates how to extend qualitative RV to quantitative and probabilistic domains, which are critical for real-time systems.
  • Time-Driven Evaluation is Key: The implementation of time-driven evaluation is a significant advancement, allowing for more accurate detection of timeliness violations that might be missed by purely event-driven approaches.
  • Statistical Rigor for Probabilistic Properties: Using sequential hypothesis testing for probabilistic properties is a robust approach that provides statistically sound results with confidence intervals, addressing a limitation in many existing RV tools.
  • Minimal Overhead: The experimental results show that RT-MaC adds minimal overhead to the verified system, making it practical for deployment in real-time environments.

Key Results

The paper presents experimental results demonstrating the overhead of RT-MaC.

  • Communication Cost: The average round-trip time (rrt) for communication between system components (target system, event recognizer, checker) was measured. With all components on the same machine, rrt was around 80.5 ms. When distributed across different machines, rrt increased but remained small (e.g., 241 ms). Even with timeouts, the delay in evaluating quantitative conditions was minimal (at most 0.2 seconds).
  • Instrumentation Overhead: The overhead of instrumentation and timer execution was evaluated. When all components were on the same machine, the instrumentation and timer execution added a very small percentage (e.g., 1.003% to 1.505%) to the program's execution time.

Limitations and Future Work

  • Limitations:
    • The probabilistic verification relies on the target system exhibiting repeating or periodic behaviors to collect sufficient samples for statistical analysis.
  • When a system terminates early before a decision can be made with sufficient confidence, RT-MaC returns the decision with a probability of error, rather than a guaranteed error bound.
  • The current implementation assumes no prior knowledge of the system model, which is a strength but might limit certain types of analysis.
  • Future Work:
    • Extend the language to support first-order temporal logics for greater expressiveness.
  • Port the current Java implementation to Real-Time Java for more accurate monitoring and checking of real-time properties.

Summary updated

BibTeX
@inproceedings{sammapun2005rt,
  author = {Usa Sammapun and Insup Lee and Oleg Sokolsky},
  title = {{RT-MaC: Runtime Monitoring and Checking of Quantitative and Probabilistic Properties}},
  booktitle = {RTCSA},
  year = {2005},
  doi = {10.1109/rtcsa.2005.84},
}
Figure