[Paper Review] Worst-Case Execution Time Calculation for Query-Based Monitors by Witness Generation
This paper presents a semantic-aware worst-case execution time (WCET) analysis method for query-based runtime monitors in real-time cyber-physical systems. By integrating low-level timing analysis with a graph solver, it generates witness input models that maximize monitor execution time, yielding safe and tight WCET estimates—validated experimentally on real-time hardware against aiT and OTAWA, showing improved accuracy over traditional methods.
Runtime monitoring plays a key role in the assurance of modern intelligent cyber-physical systems, which are frequently data-intensive and safety-critical. While graph queries can serve as an expressive yet formally precise specification language to capture the safety properties of interest, there are no timeliness guarantees for such auto-generated runtime monitoring programs, which prevents their use in a real-time setting. While worst-case execution time (WCET) bounds derived by existing static WCET estimation techniques are safe, they may not be tight as they are unable to exploit domain-specific (semantic) information about the input models. This paper presents a semantic-aware WCET analysis method for data-driven monitoring programs derived from graph queries. The method incorporates results obtained from low-level timing analysis into the objective function of a modern graph solver. This allows the systematic generation of input graph models up to a specified size (referred to as witness models) for which the monitor is expected to take the most time to complete. Hence the estimated execution time of the monitors on these graphs can be considered as safe and tight WCET. Additionally, we perform a set of experiments with query-based programs running on a real-time platform over a set of generated models to investigate the relationship between execution times and their estimates, and compare WCET estimates produced by our approach with results from two well-known timing analyzers, aiT and OTAWA.
Motivation & Objective
- To address the lack of safe and tight WCET estimates for data-driven, query-based runtime monitors in real-time safety-critical systems.
- To overcome the limitations of traditional static WCET analysis, which fails to exploit domain-specific semantic information in input models.
- To generate input graph models (witness models) that maximize monitor execution time, enabling tighter WCET bounds.
- To validate the approach on real-time hardware and compare its WCET estimates with established tools like aiT and OTAWA.
- To enable the deployment of expressive, graph-query-based monitors in hard real-time systems by providing formally sound and practical timing guarantees.
Proposed method
- Integrates low-level timing analysis from IPET-based tools (e.g., aiT, OTAWA) into the objective function of a modern graph solver.
- Uses the solver to systematically generate input graph models (witness models) of up to a specified size that maximize expected execution time of the monitor.
- Incorporates domain-specific constraints and semantic information about the input data into the optimization process.
- Employs a hybrid approach combining static analysis and model generation to produce tight WCET estimates.
- Constructs witness models not only for complex queries but also for random graph structures to test worst-case behavior.
- Validates results by measuring actual execution times on a real-time platform and comparing them with estimates from aiT and OTAWA.
Experimental results
Research questions
- RQ1Can witness model generation produce safe and tight WCET estimates for query-based runtime monitors?
- RQ2How does the integration of low-level timing data with high-level semantic constraints improve WCET estimation accuracy?
- RQ3Does the generated witness model consistently lead to the longest observed execution times in practice?
- RQ4How do the WCET estimates from the proposed method compare to those from established tools like aiT and OTAWA?
- RQ5To what extent can partial input data and memory layout modeling improve WCET precision in complex queries?
Key findings
- The proposed method consistently generated witness models that exhibited the longest execution times in all experiments, indicating that these models effectively represent worst-case input scenarios.
- WCET estimates from the proposed method were significantly tighter than those from standard static analysis, with overestimation reduced compared to baseline tools.
- The approach outperformed aiT in high-precision mode when memory layout differences affected runtime, as aiT's estimates were based on a single, fixed memory layout.
- OTAWA's estimates were less precise than the proposed method, particularly on complex queries with dynamic control flow.
- The method demonstrated that incorporating semantic and low-level timing data into model generation yields more accurate WCET bounds than traditional approaches.
- The results suggest that witness model generation is a viable and effective strategy for achieving tight WCET bounds in data-intensive, real-time monitoring systems.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.