NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Program Repair for Hyperproperties

Borzoo Bonakdarpour, Bernd FinkbeinerATVA 2019 · DOI

Abstract

We study the repair problem for hyperproperties specified in the temporal logic HyperLTL. Hyperproperties are system properties that relate multiple computation traces. This class of properties includes information flow policies like noninterference and observational determinism. The repair problem is to find, for a given Kripke structure, a substructure that satisfies a given specification. We show that the repair problem is decidable for HyperLTL specifications and finite-state Kripke structures. We provide a detailed complexity analysis for different fragments of HyperLTL and different system types: tree-shaped, acyclic, and general Kripke structures.

Introduction

Traditional program verification and repair focus on trace properties, which ask whether every single execution of a program avoids a specific bad state, such as a crash. However, modern security policies often require hyperproperties, which relate multiple executions to one another. For example, Noninterference states that if two executions differ only in secret inputs, they must produce identical public outputs. Such properties cannot be verified by looking at one trace at a time; they require comparing pairs or sets of traces.

While progress has been made in verifying these properties, automatically fixing (repairing) a program that violates them is significantly more challenging. This paper addresses the Program Repair problem: given an existing program (represented as a Kripke structure) that may leak information, can we find a subset of its behaviors (a substructure) that satisfies the security policy without introducing entirely new behaviors?

Methods and Complexity Analysis

The authors formalize the repair problem using HyperLTL, an extension of Linear Temporal Logic (LTL) that allows for quantification over traces (e.g., "for all traces $\pi_1$ and $\pi_2$... "). The core contribution of the paper is a rigorous complexity analysis categorized by two primary axes:

  1. System Structure: The program representation ranges from simple Trees (execution logs) and Acyclic Graphs (finite-phase protocols like SSL/TLS) to General Kripke Structures (arbitrary finite-state programs with loops).
  2. Logic Fragments: The complexity is determined by the number of quantifier alternations (switching between "for all" $\forall$ and "there exists" $\exists$) within the HyperLTL formula.
Complexity of the HyperLTL repair problem across different system structures and logic fragments.

The authors prove that for any finite Kripke structure and HyperLTL formula, a repair is decidable. Interestingly, for many fragments, the complexity of repairing a system matches the complexity of model checking it, as finding a repair often involves identifying a valid substructure and verifying it.

Case Study: The EDAS System

To demonstrate practical application, the authors analyze a real-world information leak in the EDAS Conference Management System. In this scenario, authors might deduce their paper's acceptance status prematurely based on whether they are assigned to a session. By representing the system as a "program sketch" with nondeterministic "holes," the repair algorithm can identify a substructure that prevents this leak.

Comparison of system outputs before (left) and after (right) repair in the EDAS conference management case study. Note the change in session assignment for bar2 to prevent information leakage.

Key Insights

  • Repair as Controlled Synthesis: Repair is a restricted form of synthesis. By limiting the search to substructures of an existing model, the problem remains decidable, whereas general HyperLTL synthesis is often undecidable.
  • Structural Impact: The "shape" of the program's state space is the primary driver of complexity. Repairing tree-shaped structures is relatively efficient (often in NP or P), while general graphs can reach NONELEMENTARY complexity for complex formulas.
  • The Cost of Alternation: Each switch between universal and existential quantification over traces significantly increases computational difficulty, particularly in general graphs where it leads to EXPSPACE or higher.

Limitations and Future Work

The current framework is limited to finite-state Kripke structures and does not yet address infinite-state programs or complex data types. Furthermore, the repair model only allows for the removal of transitions (eliminating "bad" nondeterminism) rather than adding new logic. Future research aims to extend these methods to reactive environments where programs interact with unpredictable external inputs.

Summary updated

BibTeX
@inproceedings{bonakdarpour2019program,
  author = {Borzoo Bonakdarpour and Bernd Finkbeiner},
  title = {{Program Repair for Hyperproperties}},
  booktitle = {ATVA},
  year = {2019},
  doi = {10.1007/978-3-030-31784-3\_25},
}
Figure