Abstract
Reactive systems, such as operating system kernels and hardware controllers, present significant verification challenges due to their event-driven nature and complex concurrency models. This paper introduces $π$-Core, a formal language and proof system designed to address these challenges. By integrating events as first-class citizens into a traditional rely-guarantee framework, $π$-Core enables modular verification of systems involving both multicore concurrency and nested interrupts. The framework is formally verified in Isabelle/HOL and demonstrated through case studies on a stepper motor controller and an ARINC 653 multicore kernel.
Introduction
Reactive systems are characterized by their response to external stimuli—interrupts, system calls, or sensor data—rather than a simple linear execution path. Verifying these systems is notoriously difficult for several reasons. First, multicore concurrency introduces non-deterministic interleavings. Second, high-priority interrupts can preempt running handlers at any point. Finally, traditional rely-guarantee (R-G) methods often struggle to capture the high-level event-driven interactions typical of these systems, focusing instead on low-level imperative state changes.
The authors propose $π$-Core to bridge the gap between high-level event-based modeling and low-level imperative verification, providing a sound logic for reasoning about fine-grained interleaving in concurrent reactive environments.
The $π$-Core Framework
The $π$-Core framework, implemented in the Isabelle/HOL interactive theorem prover, consists of a hierarchical language and an associated proof system.
Language Hierarchy
The language is structured to reflect the architecture of reactive systems:
- Basic Programs: Standard imperative code.
- Events: Defined by a name, a guard condition, and a body (a basic program).
- Event Systems: A collection of events representing a single processor's execution environment.
- Parallel Event Systems: Multiple event systems running in parallel, representing multicore architectures.
Event-Based Rely-Guarantee Logic
The core innovation is the extension of R-G reasoning to the event level. In $π$-Core, the "rely" and "guarantee" conditions describe the behavior of event sequences and their cumulative effects on system state. Unlike frameworks that assume event atomicity, $π$-Core supports fine-grained interleaving, allowing events to be interrupted at nearly any internal step.
The proof system includes rules for composing and manipulating these specifications. For instance, as shown in the figure above, the [UNPRE] rule allows for the union of preconditions, while [INTPOST] handles the intersection of postconditions, facilitating modular proof construction.
Case Studies and Results
The framework was evaluated using two primary case studies:
- Interruptible Stepper Motor Controller: A system for an unmanned vehicle that must manage motor movement while processing radar interrupts for collision avoidance. The authors successfully proved functional correctness, specifically that the vehicle stops before a collision occurs.
- ARINC 653 Multicore Kernel: A model of a safety-critical avionics standard focusing on Inter-Partition Communication (IPC). The verification proved that critical system invariants—such as ensuring running partitions are correctly deployed on their respective cores—are preserved across all possible multicore interleavings.
The entire development, including the framework and case studies, comprises approximately 15,000 lines of Isabelle/HOL code, representing roughly 10 person-months of effort.
Conclusion and Future Work
$π$-Core demonstrates that treating events as primary units of reasoning simplifies the management of rely-guarantee relations in complex systems. By distinguishing between modular composition (interrupts on a single core) and parallel composition (multicore interaction), the framework provides a scalable approach to reactive system verification.
Future work includes extending the framework to support liveness properties (such as deadlock freedom), developing "event refinement" to link abstract models to low-level implementations, and increasing proof automation to make the system more accessible to non-experts.
Summary updated