Introduction
In the field of logic synthesis and formal verification, the task of generating Boolean functions that satisfy specific logical requirements is fundamental. Traditionally, this is framed as a synthesis problem over Quantified Boolean Formulas (QBF). In standard QBF, an existential variable can depend on all universal variables that precede it in the quantifier prefix. However, many real-world applications—ranging from partial circuit design and controller synthesis to Engineering Change Orders (ECO)—require more granular control. These applications necessitate explicit dependencies, where an output variable is restricted to a specific subset of input variables.
This requirement leads to Dependency Quantified Boolean Formulas (DQBF), and the process of generating functions under these constraints is known as Henkin synthesis. Because DQBF allows for non-linear dependency structures, it is significantly more complex than QBF, moving from PSPACE-complete to NEXPTIME-complete. While symbolic tools have made strides in QBF, they often struggle with the combinatorial explosion inherent in DQBF. This paper introduces Manthan3, a data-driven framework designed to bridge this gap by combining machine learning with formal reasoning.
The Manthan3 Framework
Manthan3 departs from purely symbolic methods by adopting a "learn-and-repair" loop. The framework integrates constrained sampling, statistical learning, and formal verification into a unified pipeline.
1. Data Generation through Constrained Sampling
The process begins by treating the Boolean specification as a constraint. Manthan3 employs constrained samplers, such as CMSGen, to generate a diverse set of satisfying assignments. These assignments serve as the "training data" for the synthesis process, representing valid input-output behaviors that the final functions should emulate.
2. Dependency-Aware Candidate Learning
For each output variable, Manthan3 trains a Decision Tree classifier. To ensure the resulting functions are "legal" under the Henkin constraints, the features available to the classifier are strictly limited to the specific variables allowed by the dependency specification. By restricting the feature set at the learning stage, the tool guarantees that any synthesized function inherently respects the explicit dependency constraints, even before formal verification begins.
3. Formal Verification and MaxSAT-Based Repair
Once candidate functions are extracted from the decision trees, they are passed to a SAT solver for formal verification. If the functions satisfy the specification for all possible inputs, the synthesis is successful. If the solver finds a counterexample, Manthan3 enters a repair phase:
- Conflict Analysis: The tool uses a MaxSAT solver to identify which specific output functions are responsible for the failure in the context of the counterexample.
- Surgical Repair: By utilizing UnsatCores—the logical root causes of the failure—Manthan3 performs targeted repairs on the candidate functions. This iterative loop of verification and repair continues until a valid solution is found or the problem is determined to be unrealizable.
Experimental Evaluation
The authors evaluated Manthan3 against a comprehensive suite of 563 instances derived from the DQBF tracks of QBFEval 2018, 2019, and 2020. These benchmarks include challenges in equivalence checking of partial designs and succinct SAT representations.
Key Results
- Unique Solvability: Manthan3 successfully synthesized Henkin functions for 26 benchmarks that had never been solved by any previous state-of-the-art tool (such as HQS2 or Pedant).
- Portfolio Enhancement: In the context of a "Virtual Best Synthesizer" (a portfolio of existing tools), the inclusion of Manthan3 increased the total number of solved instances from 178 to 204. This represents a significant advancement in the state-of-the-art for DQBF solving.
- Efficiency: Manthan3 demonstrated high efficiency, achieving the fastest synthesis time on 42 of the 204 solved benchmarks.
Discussion and Insights
The success of Manthan3 highlights the power of orthogonality in solver design. Traditional symbolic methods like quantifier elimination or interpolation often struggle when logical formulas become overly dense or complex. By contrast, Manthan3’s data-driven approach focuses on sampling the solution space, allowing it to find functions in regions that symbolic methods cannot easily reach.
Furthermore, the framework demonstrates that machine learning does not need to be perfectly accurate to be useful in formal methods. In Manthan3, the Decision Tree acts as a heuristic guide, while the MaxSAT-based repair and SAT-based verification provide the mathematical rigor required for a correct-by-construction result.
Limitations and Future Work
While powerful, Manthan3 is currently incomplete. The repair mechanism is not always fully aware of the global interactions between different Henkin dependencies, which can lead to failures in finding a repair even when a solution exists. Future research will focus on developing more sophisticated repair strategies and investigating the specific logical structures where data-driven methods hold the greatest advantage over symbolic ones.
Summary updated