Modern safety-critical systems live in two worlds at once. Consider an autonomous vehicle: its onboard computer makes discrete decisions (e.g., if a pedestrian is detected, then switch to braking mode), while its physical body obeys continuous laws of physics (momentum, friction, and velocity governed by differential equations).
When discrete software logic interacts with continuous physical dynamics, we get a hybrid system. Traditional verification methods fail here. Software model checkers are designed for discrete state spaces and struggle with continuous time; conversely, control theory tools excel at smooth trajectories but falter when software abruptly switches modes. To guarantee that an autonomous train or car will never enter an unsafe state, researchers have developed unified formal frameworks that bridge this discrete-continuous divide.
The Core Challenge: Jumps and Flows
To understand why hybrid systems are difficult to verify, we can visualize their behavior as a combination of flows and jumps.
- Flows are periods of continuous evolution where the system state changes smoothly according to Ordinary Differential Equations (ODEs).
- Jumps are instantaneous discrete transitions. These occur when the system hits a specific condition called a guard (for instance, a timer expiring or a sensor crossing a threshold).
[ Mode 1: Accelerating ] --- (Guard: Speed >= Max) ---> [ Mode 2: Coasting ]
Continuous Flow Continuous Flow
dx/dt = v, dv/dt = a dx/dt = v, dv/dt = 0
As Richard M. Murray et al. point out, the complexity arises because these two dynamics cannot be analyzed in isolation. A small change in the continuous flow can completely alter which discrete guard is triggered, causing the system to jump into an entirely different operational mode.
Tracking these interactions across an infinite state space introduces severe mathematical hurdles. In fact, R Majumdar et al. demonstrated that while it is possible to compute perfect algebraic invariants for "unguarded" systems, adding even simple discrete guard conditions makes the safety verification problem mathematically undecidable in the general case. The challenge lies in accurately calculating how a continuous "tube" of possible trajectories intersects with these discrete guard sets without accumulating massive approximation errors, a problem studied extensively by Ezio Bartocci et al..
Deductive Verification: Unifying Logic and Physics
One prominent way to solve this problem is to treat physics as a first-class citizen inside computer programs. This is the intuition behind Differential Dynamic Logic ($dL$), a formal framework developed by André Platzer.
Instead of separating the software code from the physical environment, $dL$ models the entire setup as a "hybrid program." In this language, a continuous physical process is written directly alongside discrete assignments:
$$\text{Brake} \equiv \{ a := -b; \} \cup \{ \{x' = v, v' = a \ \& \ v \ge 0\} \}$$
Here, the program can either discretely change the acceleration $a$ to a braking constant $-b$, or it can flow along the differential equations $x' = v$ and $v' = a$.
By unifying logic and physics into a single language, André Platzer showed that we can prove safety properties using mathematical induction. The key is finding a differential invariant—a property that remains true at the start, stays true during continuous flows, and is preserved across discrete jumps. If an invariant can be found that excludes the unsafe states, the system is provably safe for all time.
This deductive approach powers tools like KeYmaera X. As reports by Stefan Mitsch et al. and Bohua Zhan show, automated theorem provers have advanced to the point where they can automatically discover these invariants for complex nonlinear systems, minimizing the need for manual human proofs. Furthermore, Yong Kiam Tan demonstrated that even classical "switched systems" from control engineering can be formally verified by translating them into these hybrid programs.
Reachability Analysis and Barrier Certificates
When finding a perfect logical invariant is too difficult, an alternative approach is to construct a geometric or algebraic boundary that separates the system's possible behaviors from unsafe regions. This is known as reachability analysis.
Instead of simulating a single trajectory, reachability tools compute a flowpipe—a geometric over-approximation (using shapes like polytopes or zonotopes) of every state the system could possibly reach from a set of initial conditions. If this flowpipe never touches the designated "unsafe zone," the system is verified.
To scale this to higher dimensions without a combinatorial explosion of geometric shapes, researchers use Barrier Certificates. Think of a barrier certificate as an algebraic wall. It is a function $B(x)$ over the state space where:
- $B(x) \le 0$ for all possible initial states.
- $B(x) > 0$ for all unsafe states.
- The derivative of $B(x)$ along the system's dynamics is always negative or zero when $B(x) = 0$.
Initial States [ B(x) <= 0 ]
│
▼
┌───────────────┐
│ Actual Flows │ === Barrier Wall: B(x) = 0 === (Cannot be crossed)
└───────────────┘
Unsafe States [ B(x) > 0 ]
Because the system can never cross the line where $B(x) = 0$, it is mathematically trapped in the safe zone. Abdullah Al Maruf et al. utilize Sum-of-Squares (SOS) programming to automatically search for these polynomial barrier functions, using them to guarantee physical safety and calculate critical timing parameters during cyber-attacks. To handle real-world unpredictability, Abolfazl Lavaei et al. extended this mechanism to stochastic hybrid systems, providing a way to generate safety boundaries that account for random noise and sudden disturbances without suffering from the curse of dimensionality.
Constraint Solving via SMT
Another powerful strategy is to translate the hybrid verification problem into a massive constraint satisfaction puzzle, which can then be handed off to Satisfiability Modulo Theories (SMT) solvers.
In a traditional discrete SMT problem, the solver looks for a combination of variables that makes a formula true. For hybrid systems, the formula must encode continuous differential equations. Kyungmin Bae et al. achieved this by developing a compositional syntax within the dReal solver. By using interval arithmetic, the solver can bound the continuous flows of nonlinear ODEs within precise numerical tolerances, checking whether any sequence of discrete jumps and continuous flows can force the system into an unsafe state.
Similarly, Sumit Gulwani et al. demonstrated that the search for inductive invariants can be completely inverted: instead of guessing invariants manually, the problem can be framed as a constraint-satisfaction problem where the solver automatically computes the coefficients of the required invariant polynomials.
Data-Driven and Black-Box Verification
What happens if the physical system is too complex to write down as a clean set of differential equations, or if the controller relies on a proprietary "black-box" algorithm?
When explicit mathematical models are unavailable, researchers turn to data-driven verification. Chuchu Fan developed the DryVR framework to address this challenge. DryVR splits the problem: it uses a white-box graph to model the discrete mode transitions, but treats the continuous flows as a black box.
Instead of relying on analytical equations, DryVR runs a finite number of simulations and learns a sensitivity discrepancy function. This function measures how much two trajectories can diverge over time if they start from slightly different initial states. By combining a single simulation trace with this learned sensitivity bound, the framework can soundly calculate a "tube" that is guaranteed to contain all neighboring trajectories.
Initial Set ──► [ Run Simulation Trace ] ──► Add Sensitivity Discrepancy ──► Sound Flowpipe
This data-driven approach allows formal safety guarantees to be extended to highly complex, unmodeled physical systems, ensuring that verification keeps pace with the messy realities of autonomous engineering.