Engineering an Efficient Boolean Functional Synthesis Engine

Priyanka Golia, Friedrich Slivovsky, Subhajit Roy, Kuldeep S. Meel

Abstract

Boolean functional synthesis is the task of automatically generating functions (Skolem functions) that satisfy a given Boolean specification. While recent data-driven approaches like Manthan have shown promise, they often struggle with scalability on complex industrial benchmarks. This paper introduces Manthan2, which significantly enhances synthesis performance through four key innovations: semantic unique function extraction via Craig interpolation, multi-classification using graph-based clustering, strategic variable retention, and a refined repair phase using Lexicographic MaxSAT. Manthan2 solves 509 out of 609 standard benchmarks, representing a substantial leap over the previous state-of-the-art.

Introduction

Boolean functional synthesis addresses a fundamental problem: given a specification $\psi(X, Y)$ relating input variables $X$ and output variables $Y$, can we automatically generate a set of functions $F$ such that $\forall X, \psi(X, F(X))$ holds? These functions, known as Skolem functions, are vital for applications in circuit design, automated program repair, and cryptography.

While the original Manthan tool pioneered the use of machine learning to "guess" these functions and formal methods to "fix" them, it faced scalability limitations on large-scale problems. Manthan2 addresses these bottlenecks by integrating more sophisticated formal techniques with structural insights from the underlying Boolean formulas.

Methodology

Manthan2 introduces four primary algorithmic improvements to the synthesis pipeline:

1. Interpolation-based Unique Function Extraction

Instead of relying solely on data-driven learning, Manthan2 uses Craig interpolation to identify variables that are uniquely defined by the specification. This "semantic" approach is more thorough than simple syntactic pattern matching, allowing the tool to extract functions for a large portion of variables before the learning phase even begins.

2. Clustering-based Multi-Classification

Previous iterations learned functions for each output variable in isolation. Manthan2 utilizes a primal graph to identify clusters of related variables. It then employs a multi-classifier to learn functions for these variables simultaneously. This captures the inherent dependencies between variables and significantly reduces training overhead.

A decision tree representation of a multi-classifier used to learn functions for multiple variables simultaneously.

3. Variable Retention (Determined Features)

Contrary to standard practices in variable elimination, Manthan2 retains "determined" variables—those for which functions have already been found—as features for subsequent learning and repair phases. These variables act as high-level building blocks, resulting in more compact and efficient Skolem functions.

4. Lexicographic MaxSAT Repair

When a candidate function fails verification, it must be repaired. Manthan2 utilizes Lexicographic MaxSAT to prioritize which variables to fix based on their dependency order. This prevents redundant repair cycles and ensures that the tool converges on a valid solution more quickly.

Experimental Results

The authors evaluated Manthan2 on a comprehensive suite of 609 benchmarks, including instances from QBFEval’17, QBFEval’18, and various arithmetic circuits.

  • Benchmark Performance: Manthan2 solved 509 instances, a massive improvement over the 356 solved by the original Manthan and 280 by CADET.
  • Efficiency Gains: The PAR-2 score, which penalizes timeouts, dropped from 6374.39 to 2858.61, indicating a dramatic increase in overall efficiency.
  • Interpolation Success: In over 40% of the benchmarks, interpolation alone was sufficient to extract functions for at least 95% of the variables, greatly simplifying the remaining synthesis task.

Conclusion

Manthan2 demonstrates that the synergy between machine learning and formal methods can be significantly enhanced by incorporating structural and semantic insights. By leveraging Craig interpolation for extraction and Lexicographic MaxSAT for repair, Manthan2 sets a new standard for Boolean functional synthesis. Future work will explore applying these data-driven techniques to higher-order logics and further refining the clustering mechanisms to handle even more complex industrial specifications.

Summary updated

BibTeX
@inproceedings{golia2021engineering,
  author = {Priyanka Golia and Friedrich Slivovsky and Subhajit Roy and Kuldeep S. Meel},
  title = {{Engineering an Efficient Boolean Functional Synthesis Engine}},
  booktitle = {ICCAD},
  year = {2021},
  url = {https://openreview.net/forum?id=zxxdgxKF33},
}
Figure