Skip to main content
QUICK REVIEW

[Paper Review] A Generalized Hybrid Hoare Logic

Naijun Zhan, Xiangyu Jin|arXiv (Cornell University)|Mar 27, 2023
Formal Methods in VerificationComputer Science5 citations
TL;DR

This paper presents a generalized hybrid Hoare logic (HHL) for Hybrid Communicating Sequential Processes (HCSP), enabling compositional, concurrent verification of hybrid systems with continuous dynamics and discrete communication. It achieves continuous and discrete relative completeness, supports differential invariants, and is implemented in Isabelle/HOL to verify complex schedulers with 54 state combinations and 10,000 lines of proof code.

ABSTRACT

Deductive verification of hybrid systems (HSs) increasingly attracts more attention in recent years because of its power and scalability, where a powerful specification logic for HSs is the cornerstone. Often, HSs are naturally modelled by concurrent processes that communicate with each other. However, existing specification logics cannot easily handle such models. In this paper, we present a specification logic and proof system for Hybrid Communicating Sequential Processes (HCSP), that extends CSP with ordinary differential equations (ODE) and interrupts to model interactions between continuous and discrete evolution. Because it includes a rich set of algebraic operators, complicated hybrid systems can be easily modelled in an algebra-like compositional way in HCSP. Our logic can be seen as a generalization and simplification of existing hybrid Hoare logics (HHL) based on duration calculus (DC), as well as a conservative extension of existing Hoare logics for concurrent programs. Its assertion logic is the first-order theory of differential equations (FOD), together with assertions about traces recording communications, readiness, and continuous evolution. We prove continuous relative completeness of the logic w.r.t. FOD, as well as discrete relative completeness in the sense that continuous behaviour can be arbitrarily approximated by discretization. Finally, we implement the above logic in Isabelle/HOL, and apply it to verify two case studies to illustrate the power and scalability of our logic.

Motivation & Objective

  • To address the lack of expressive and compositional specification logics for hybrid systems with concurrency and communication.
  • To generalize and simplify existing DC-based hybrid Hoare logics while preserving expressiveness for continuous and discrete behaviors.
  • To achieve relative completeness for both continuous evolution (via FOD) and discrete approximation (via discretization).
  • To support practical verification through an Isabelle/HOL implementation and case studies on real-time schedulers.
  • To simplify proof construction using trace assertions and sound, complete rules for differential invariants.

Proposed method

  • Extends Hoare logic with trace assertions to model communication history and readiness in concurrent processes.
  • Introduces a hybrid assertion logic combining first-order logic of differential equations (FOD) with trace-based conditions for continuous and discrete evolution.
  • Employs a proof system with rules for parallel composition that use compatibility conditions on traces and communication events.
  • Applies differential invariants and differential ghosts to reason about ODEs without explicit solutions.
  • Uses discretization to approximate continuous behavior, enabling discrete relative completeness.
  • Implements the logic in Isabelle/HOL with automated support for trace synchronization and invariant checking.

Experimental results

Research questions

  • RQ1Can a Hoare logic be designed to support both concurrent communication and continuous dynamics in hybrid systems?
  • RQ2How can relative completeness be achieved for hybrid systems with ODEs and concurrent processes?
  • RQ3Can differential invariants be used to simplify proofs of continuous evolution without solving ODEs?
  • RQ4How can trace assertions enable compositional verification of concurrent hybrid systems?
  • RQ5Can the logic be implemented efficiently and scale to complex, real-world hybrid systems?

Key findings

  • The logic achieves continuous relative completeness with respect to first-order logic of differential equations (FOD).
  • Discrete relative completeness is established by showing that continuous behavior can be arbitrarily approximated via discretization.
  • The logic is a conservative extension of classical Hoare logic for concurrent programs, preserving compositional reasoning.
  • The Isabelle/HOL implementation successfully verifies a real-time scheduler with 54 state combinations and 10,000 lines of proof code.
  • The use of trace assertions and differential invariants significantly simplifies proof construction in complex hybrid systems.
  • The approach supports verification of safety properties such as mutual exclusion and non-preemption in concurrent real-time systems.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.