Synthesizing Reactive Systems from Hyperproperties

Bernd Finkbeiner, Christopher Hahn, Philip Lukert, Marvin Stenger, Leander Tentrup

This paper explores a "holy grail" of formal methods: the automatic generation of secure, reactive systems directly from high-level specifications. While we have long been able to synthesize systems from Linear Temporal Logic (LTL), LTL is limited to "trace properties"—it can only look at one execution path at a time. This paper breaks new ground by tackling synthesis for HyperLTL, a logic capable of expressing hyperproperties, which relate multiple execution traces to one another (e.g., "an observer cannot distinguish between a secret and a non-secret input based on the output").

TL;DR

The authors provide the first comprehensive study of the reactive synthesis problem for HyperLTL, identifying which fragments of the logic are decidable (solvable) and which are not. They introduce BoSyHyper, a tool that uses bounded synthesis and SMT solvers to either automatically generate a system implementation or prove that a specification is impossible to realize.

What Problem Does This Paper Address?

Reactive synthesis is the process of automatically constructing a system (like a circuit or a protocol) that is guaranteed to satisfy a given specification regardless of what the environment does.

The major gap addressed here is that standard logics like LTL cannot express critical security and design requirements known as hyperproperties. For example, non-interference (ensuring secret data doesn't leak to public outputs) requires comparing two different executions of the same system. HyperLTL was designed to express these, but until this work, it was unknown if we could actually synthesize systems from it. The authors also show that HyperLTL synthesis is a "super-problem" that subsumes the notoriously difficult challenge of distributed synthesis.

Methods

The authors approach the problem from two angles: theoretical classification and practical implementation.

  1. Decidability Mapping: They analyze the "quantifier prefix" of HyperLTL formulas (how many "for all traces" $\forall$ and "there exists a trace" $\exists$ symbols are used). They prove that while the general problem is undecidable, specific fragments—like those with only existential quantifiers or a very limited number of universal quantifiers—remain decidable.
  2. Bounded Synthesis: For the universal fragment ($\forall^*$), they propose a semi-decision procedure. Instead of looking for any possible implementation, they search for a finite-state machine with a maximum of $n$ states.
  3. Self-Composition: To check if a system satisfies a universal hyperproperty, they use "self-composition," effectively running multiple copies of the system in parallel to see if the required relationships between their traces hold.
  4. Bounded Unrealizability: To prove a system cannot be built, they search for a "counterexample strategy"—an environment behavior that can force the system to violate the spec no matter how it is designed.

Key Insights and Ideas

  • The Undecidability Wall: The paper identifies exactly where the problem becomes impossible. Adding just two universal quantifiers to an existential fragment ($\exists^*\forall^{>1}$) triggers undecidability.
  • Subsuming Distributed Synthesis: A key "aha moment" is the realization that HyperLTL can model distributed architectures. By requiring that an output only depends on a subset of inputs (observational determinism), you can force a single synthesized strategy to behave like multiple independent processes.
  • The Linear Fragment: They identify a "Linear $\forall^*$" fragment that is decidable. This fragment corresponds to distributed systems without "information forks," where information flows in a predictable, linear fashion.
Summary of decidability results for different HyperLTL fragments.

Key Results

The authors implemented their algorithms in a tool called BoSyHyper and tested it on several classic problems:

  • Symmetric Mutex: They successfully synthesized a mutual exclusion protocol that is guaranteed to be symmetric (fair to all processes). When given an impossible symmetric spec, the tool correctly produced a counterexample.
  • Error-Correcting Codes: The tool synthesized encoders and decoders with specific Hamming distance properties, effectively "inventing" simple error-correcting codes from logic.
  • CAP Theorem: BoSyHyper was able to automatically prove the unrealizability of the CAP theorem (the impossibility of simultaneously providing Consistency, Availability, and Partition tolerance in a distributed system).
  • Performance: Most benchmarks were solved in seconds or minutes using the Z3 SMT solver, though complex fault-tolerance specs with many states could take over an hour.
Table showing experimental results across various benchmarks.

Limitations and Future Work

  • State Space Explosion: Like all bounded synthesis approaches, the method struggles as the number of required states in the implementation increases. The SMT solver's workload grows significantly with the state bound $n$.
  • Fragment Restrictions: Because large parts of HyperLTL are undecidable, the tool cannot provide guarantees for every possible formula.
  • Future Directions: The authors suggest exploring more efficient automaton constructions and heuristics to handle the undecidable fragments more effectively in practice, potentially moving toward more complex "real-world" security protocols.

Summary updated

BibTeX
@inproceedings{finkbeiner2018synthesizing,
  author = {Bernd Finkbeiner and Christopher Hahn and Philip Lukert and Marvin Stenger and Leander Tentrup},
  title = {{Synthesizing Reactive Systems from Hyperproperties}},
  booktitle = {CAV},
  year = {2018},
  doi = {10.1007/978-3-319-96145-3\_16},
}
Figure