Functional Synthesis via Input-Output Separation

Supratik Chakraborty, Dror Fried, Lucas M. Tabajara, Moshe Y. VardiarXiv 2018

This paper, presented by researchers from IIT Bombay and Rice University, introduces a fresh perspective on a classic problem in formal methods: Boolean functional synthesis. By breaking down complex specifications into their constituent input and output parts, the authors demonstrate that we can solve problems that previously "choked" state-of-the-art tools.

TL;DR

The authors propose the "Back-and-Forth" algorithm, a novel approach to Boolean functional synthesis that decomposes CNF specifications into separate input and output components. By alternating between SAT and MaxSAT solvers, the algorithm synthesizes functions as explainable decision lists and proves to be significantly more efficient for specific classes of hard benchmarks.

What Problem Does This Paper Address?

Boolean functional synthesis is the task of automatically constructing a function $g(x)$ from a specification $F(x, y)$ such that for every input $x$, the output $y = g(x)$ satisfies the relation. This is a cornerstone of automated circuit repair, program synthesis, and QBF (Quantified Boolean Formula) solving.

The fundamental challenge is complexity: the problem is CO-NPNP-hard. While modern tools use techniques like factorization (breaking the formula into smaller pieces) or CEGAR (counter-example guided abstraction refinement), they often struggle when sub-components are highly interdependent. As the number of variables grows, these tools frequently hit a wall, especially when the internal structure of the specification is complex.

Methods

The authors introduce a decomposition strategy based on Input-Output Separation.

  1. Clause Splitting: Every clause in a Conjunctive Normal Form (CNF) specification is split into an "input part" (literals involving $x$) and an "output part" (literals involving $y$).
  2. The Back-and-Forth Algorithm: Instead of treating the formula as a monolithic block, the algorithm alternates between two analyses:
  3. Input Analysis: Uses a SAT solver to find Maximal Falsifiable Subsets (MFS) of input clauses. These represent groups of inputs that "force" certain output requirements.
  4. Output Analysis: Uses a MaxSAT solver to find Maximal Satisfiable Subsets (MSS) of output clauses that "cover" the requirements identified by the input analysis.
  5. Decision Lists: Unlike traditional tools that output complex graphs (like BDDs or AIGs), this algorithm produces a decision list (a sequence of if-then-else rules). This format is highly explainable, allowing a human engineer to see exactly which part of the specification triggered a specific output.
  6. Structural Preprocessing: The paper includes a graph-based preprocessing step to partition the specification into independent sub-problems based on shared output variables, further boosting efficiency.

Datasets

The algorithm was evaluated using the QBFEVAL’16 benchmark suite (2QBF track). The benchmarks are categorized into seven families:

  • MUTEXP, QSHIFTER, TREE: Logic and synchronization problems.
  • RANKINGFUNCTIONS, FIXPOINTDETECTION: Program analysis tasks.
  • REDUCTIONFINDING, SORTINGNETWORKS: Complex relational specifications that are notoriously difficult for existing solvers.

Key Insights and Ideas

  • Duality of Falsification and Satisfaction: The core "aha moment" is that an input assignment $x$ satisfies a clause either by satisfying the input literals or by forcing the output literals to be satisfied. By identifying which input clauses are falsified, the algorithm knows exactly which output clauses the function must satisfy.
  • Complexity Reduction: The authors prove a significant theoretical result: if the "consensus graph" of the input component has a polynomial number of maximal cliques, the synthesis problem drops from CO-NPNP-hard to $P^{NP}$.
  • Explainability as a First-Class Citizen: By choosing decision lists as the output format, the authors address a major grievance in formal methods: the "black box" nature of synthesized circuits. Each "if" condition in the list corresponds to a specific set of constraints in the original specification.

Key Results

  • Niche Dominance: The Back-and-Forth algorithm was strictly superior in the REDUCTIONFINDING and SORTINGNETWORKS families. In these cases, state-of-the-art tools like CADET, RSynth, and BFSS failed almost entirely, while Back-and-Forth solved multiple instances.
  • Efficiency: For the instances it solved, the algorithm was often faster by over an order of magnitude compared to other tools.
  • Portfolio Potential: While it didn't win every category (it struggled with RANKINGFUNCTIONS where CADET excelled), the results suggest it is a perfect candidate for a "portfolio solver"—a tool that handles the specific "difficult corners" where other methods fail.

Limitations and Future Work

  • Realizability: The current version of the algorithm assumes the specification is realizable (i.e., a solution actually exists). The authors note that extending this to handle unrealizable specifications is a primary goal for future work.
  • Performance Gaps: The algorithm timed out on certain program-analysis-heavy benchmarks. The authors admit that the exact reason why some CNF structures favor their approach while others don't is still an open research question.
  • Parallelization: The current implementation is sequential. Given that it relies on repeated SAT/MaxSAT calls, there is significant potential for speedup through parallelization.

Summary updated

BibTeX
@misc{chakraborty2018functional,
  author = {Supratik Chakraborty and Dror Fried and Lucas M. Tabajara and Moshe Y. Vardi},
  title = {{Functional Synthesis via Input-Output Separation}},
  year = {2018},
  eprint = {1808.08190},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1808.08190},
}
Figure