On-the-fly Synthesis for LTL over Finite Traces: An Efficient Approach that Counts

Shengping Xiao, Yongkang Li, Shufang Zhu, Jun Sun, Jianwen Li, Geguang Pu, Moshe Y. VardiarXiv 2024

Abstract

We present an on-the-fly synthesis framework for Linear Temporal Logic over finite traces ($LTL_f$) based on top-down deterministic automata construction. Existing approaches rely on constructing a complete Deterministic Finite Automaton (DFA) corresponding to the $LTL_f$ specification, a process with doubly exponential complexity relative to the formula size. This "construct-then-solve" paradigm often leads to memory exhaustion before synthesis can even begin. To address this, we introduce a method for converting $LTL_f$ into Transition-based DFA (TDFA) by leveraging $LTL_f$ semantics directly. Our algorithm traverses the state space in a global forward manner combined with a local backward method for handling strongly connected components (SCCs). Furthermore, we introduce two optimization techniques—model-guided synthesis and state entailment—to enhance practical efficiency. Experimental results demonstrate that our approach, implemented in the tool Tople, achieves state-of-the-art performance across diverse benchmarks.

Introduction

In formal synthesis, the goal is to automatically generate a system—such as a robot controller or a hardware circuit—that is mathematically guaranteed to satisfy a given specification. Linear Temporal Logic over finite traces ($LTL_f$) has emerged as a preferred logic for specifying behaviors with clear terminal goals, such as business processes or finite-horizon robotic tasks.

Traditionally, $LTL_f$ synthesis follows a two-step offline process: first, converting the $LTL_f$ formula into a Deterministic Finite Automaton (DFA), and second, treating that DFA as a game arena where a "System" player attempts to reach an accepting state despite the moves of an "Environment" player. However, the first step is a notorious bottleneck. Because the DFA construction is doubly exponential relative to the formula size, many real-world specifications result in state spaces too large to be stored in memory, preventing the game-solving phase from ever starting.

The On-the-fly Framework

To bypass the state-space explosion, we propose an "on-the-fly" framework. Instead of building the entire automaton upfront, our approach interleaves the construction of a Transition-based DFA (TDFA) with the game-solving process. This allows the synthesizer to potentially find a winning strategy after exploring only a small fraction of the total state space.

Formula Progression and TDFA

Our method utilizes formula progression to determine transitions. Given a current $LTL_f$ formula (representing the current state) and a set of truth assignments for the system and environment variables, progression calculates the "future" requirement—the formula that must be satisfied in the next time step. This allows us to build the TDFA incrementally, where transitions are labeled with propositional formulas and lead to new $LTL_f$ sub-formulas.

Hybrid Search Strategy

On-the-fly methods often struggle with cycles in the state space. We address this through a hybrid search strategy:

  1. Global Forward Search: A depth-first traversal explores the state space from the initial formula.
  2. Local Backward Search: We employ Tarjan’s algorithm to detect Strongly Connected Components (SCCs). When an SCC is fully explored, a local fixed-point search is conducted to resolve the winning/losing status of all states within that loop. This ensures that the algorithm remains sound and complete even in the presence of complex cycles.

Optimization Techniques

To further improve performance, we integrated two primary optimizations:

  • Model-guided Synthesis: We use an $LTL_f$ SAT solver to generate "satisfiable traces" (paths that lead to a goal). These traces serve as a heuristic "compass," guiding the forward search toward winning states more greedily than a blind search.
  • State Entailment: We check the semantic relationship between new states and previously explored states. If a new state is logically "stronger" than a known winning state (i.e., it entails it), we can immediately classify the new state as winning without further exploration, significantly pruning the search tree.

Experimental Evaluation

We evaluated our tool, Tople, against leading competitors including Lisa, LydiaSyft, and Nike. The benchmark suite consisted of 3,380 $LTL_f$ synthesis instances, ranging from random formulas to classic games (like Nim) and common specification patterns.

Key Findings

  • Superior Scalability: Tople solved 2,998 out of 3,380 instances, the highest total among all tested tools. It was particularly dominant in the "Ascending" benchmarks, which are designed to test scalability as formula complexity increases.
  • Unique Solutions: Tople successfully solved 93 difficult instances that no other tool could handle, demonstrating the power of the on-the-fly approach for complex specifications.
  • Optimization Impact: The combination of model-guidance and state entailment proved critical, allowing Tople to solve 114 more instances than a baseline version of the on-the-fly algorithm.
  • Complementarity: While Tople excelled in many areas, traditional backward-search tools like LydiaSyft still performed better on specific random instances. This suggests that on-the-fly and offline methods offer complementary strengths.

Conclusion

By shifting from a "construct-then-solve" paradigm to an on-the-fly TDFA game-solving approach, we have significantly mitigated the doubly exponential bottleneck of $LTL_f$ synthesis. Our hybrid search strategy and SAT-based optimizations allow for efficient exploration of massive state spaces. Future work will focus on integrating on-the-fly state minimization and compositional techniques to further extend the reach of automated synthesis.

Summary updated

BibTeX
@misc{xiao2024fly,
  author = {Shengping Xiao and Yongkang Li and Shufang Zhu and Jun Sun and Jianwen Li and Geguang Pu and Moshe Y. Vardi},
  title = {{On-the-fly Synthesis for LTL over Finite Traces: An Efficient Approach that Counts}},
  year = {2024},
  eprint = {2408.07324},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.07324},
}
Figure