HyperQB: A Bounded Model Checker for Hyperproperties

Tzu-Han Hsu, Milad Rabizadeh, Kenneth Rogale, Fedor Filippov, Marco A. de Oliveira Batista, César Sánchez, Borzoo Bonakdarpour

This paper introduces HyperQB 2.0, a high-performance, "push-button" bounded model checker (BMC) designed specifically for hyperproperties. While traditional model checking looks at individual execution traces (e.g., "does this program ever crash?"), hyperproperties look at the relationship between multiple traces. This is essential for verifying security policies like non-interference, where you must prove that a secret input in one execution doesn't influence the observable output in another.

TL;DR

HyperQB 2.0 is the first highly efficient, automated tool for verifying complex hyperproperties in both finite- and infinite-state systems. By leveraging Rust and a dual SMT/QBF solver backend, it provides massive performance speedups over previous tools and introduces the first automated support for asynchronous hyperproperties (A-HLTL).

What Problem Does This Paper Address?

Most verification tools are built for "trace properties"—rules that apply to a single path through a program. However, many critical modern requirements are hyperproperties. For example:

  • Observational Determinism: Do two different runs with the same public inputs always produce the same public outputs, regardless of secret data?
  • Linearizability: Does a concurrent data structure behave consistently with a sequential one?

Verifying these is notoriously difficult because it involves complex "quantifier alternation" (e.g., "for all traces $A$, there exists a trace $B$ such that..."). Existing tools often require manual intervention, struggle with performance as the number of traces grows, or cannot handle asynchronous systems where different processes run at different speeds.

Methods

HyperQB 2.0 moves away from the slow, automata-based approaches of the past in favor of a Bounded Model Checking (BMC) approach.

  1. Unified Intermediate Representation (IR): The tool parses models from NuSMV or Verilog into a "program graph" IR. This allows it to handle both high-level logic and hardware-level designs.
  2. SMT & QBF Backends: Under the hood, HyperQB translates the verification problem into constraints for powerful solvers. It uses SMT (Z3) to handle infinite-state programs (like those with unbounded integers) and QBF (QuAbS) for finite-state problems where bit-blasting is more efficient.
  3. Loop Conditions: To move beyond simple "bug-hunting," the authors implemented specific loop conditions. If the solver finds a "lasso" (a path that loops back on itself) that satisfies certain simulation criteria, the tool can prove a property is true for an infinite timeline, not just within the finite bound $k$.
  4. Asynchrony Support: It supports A-HLTL, a logic that allows traces to "stutter" or move at different speeds, which is vital for verifying concurrent or networked systems.

Datasets

The authors evaluated HyperQB 2.0 against a massive suite of benchmarks:

  • Legacy Benchmarks: Re-evaluating cases from the original HyperQB prototype (symmetry, robot path planning).
  • New HyperLTL Benchmarks: 29 new case studies including concurrent queues, bidding protocols, and non-deterministic systems.
  • A-HLTL Benchmarks: Cases involving speculative execution, compiler optimizations, and cache-based timing attacks.
  • Hardware Security: Real-world Verilog designs, including a Floating-Point Unit (FPU) and an SPI bus.

Key Insights and Ideas

  • The Power of Rust: Moving the implementation to Rust and using direct Z3 AST (Abstract Syntax Tree) integration resulted in significant performance gains over previous Python or F# prototypes.
  • Robustness to Complexity: Unlike automata-based tools (like AutoHyper), which slow down exponentially as you add more quantifiers, HyperQB’s solver-based approach scales much better. It successfully handled formulas with up to five alternating quantifiers (e.g., $\exists \forall \forall \exists \exists$).
  • Asynchrony is No Longer a Black Box: By providing the first automated tool for A-HLTL, the authors have opened the door for verifying complex timing-side channels and speculative execution bugs that were previously too difficult to model.

Key Results

  • Speed: HyperQB 2.0 consistently outperformed AutoHyper, often by orders of magnitude. In many complex cases where AutoHyper timed out (TO), HyperQB finished in seconds.
  • Hardware Verification: The tool successfully identified timing leaks in an FPU division module, showing that it can scale to real-world hardware modules rather than just "toy" examples.
  • Versatility: It is the only tool that supports both NuSMV and Verilog, and both synchronous and asynchronous logics, making it a "one-stop shop" for hyperproperty research.

Limitations and Future Work

  • Finite State Assumption for Loops: While the IR supports infinite states, the current implementation of loop conditions for completeness assumes the state space is finite.
  • Language Support: The authors are currently working on a path to support C programs via LLVM, which would significantly broaden the tool's utility for software engineers.
  • API Development: They plan to release an API so other developers can integrate HyperQB’s core decision procedures into their own verification pipelines.

Summary updated

Abstract

We introduce the tool HyperQB 2.0, the first highly efficient push-button bounded model checker (BMC) for hyperproperties. HyperQB takes as input a model in NuSMV or Verilog and a formula expressed in the temporal logics HyperLTL or A-HLTL. The core decision procedures to implement BMC are SMT and QBF solvers, enabling verification of finite- and infinite-state programs. HyperQB offers command-line and standalone graphical, and web-based interfaces. Based on the selection of either bug-hunting or synthesis, instances of counterexamples or path witnesses are returned. The tool is entirely implemented in Rust and we report on successful and effective model checking results for a rich set of experiments on a variety of case studies with rigorous performance comparison and contrast with similar tools.
BibTeX
@misc{hsu2021hyperqb,
  author = {Tzu-Han Hsu and Milad Rabizadeh and Kenneth Rogale and Fedor Filippov and Marco A. de Oliveira Batista and César Sánchez and Borzoo Bonakdarpour},
  title = {{HyperQB: A Bounded Model Checker for Hyperproperties}},
  year = {2021},
  eprint = {2109.12989},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2109.12989},
}
Figure