TL;DR
This paper introduces a novel framework that uses logic synthesis and reinforcement learning to preprocess circuit satisfiability (CSAT) problems, transforming them into a format that state-of-the-art SAT solvers can handle much more efficiently. By optimizing for SAT solving complexity rather than traditional metrics like area or delay, they achieve significant speedups on industrial benchmarks.
What Problem Does This Paper Address?
The Circuit Satisfiability (CSAT) problem is fundamental to many tasks in Electronic Design Automation (EDA), such as logic equivalence checking and test pattern generation. While modern SAT solvers are highly effective for problems expressed in Conjunctive Normal Form (CNF), they struggle when directly applied to CSAT instances. This is because converting complex circuit structures into CNF often disrupts their natural organization, leading to inefficient representations. Existing preprocessing techniques for CNF are plentiful, but specialized methods for circuit-based representations that directly target SAT solving efficiency are underdeveloped. This paper aims to bridge this gap by creating a preprocessing framework that leverages EDA techniques and machine learning to make CSAT problems more amenable to SAT solvers.
Methods
The proposed framework combines several key techniques:
- EDA-Driven Preprocessing Pipeline: This pipeline integrates logic synthesis tools with a reinforcement learning (RL) agent.
- RL-Guided Logic Synthesis: Logic synthesis is framed as a Markov Decision Process (MDP). An RL agent is trained to select a sequence of logic synthesis operations (like rewrite, refactor, balance) that minimize the complexity of the circuit for SAT solving. The agent learns from the circuit's structural and functional embeddings, informed by tools like DeepGate2.
- Cost-Customized LUT Mapping: A novel Look-Up Table (LUT) mapping strategy is introduced. Instead of optimizing for area or delay, this mapper prioritizes minimizing "branching complexity" during SAT solving. This is achieved by defining a cost metric that quantifies how difficult a particular logic gate (represented as a LUT) is for a SAT solver to branch on.
- Circuit to CNF Conversion: After preprocessing, the optimized circuit is converted into CNF for compatibility with standard SAT solvers.
Datasets
The authors used industrial-scale benchmarks derived from logic equivalence checking (LEC) and automatic test pattern generation (ATPG) tasks.
- Training Dataset: 200 "easy" instances (solving time < 6.68s without preprocessing) were used for training the RL agent.
- Testing Dataset: 300 "hard" instances were used for evaluation. These instances were primarily in And-Inverter Graph (AIG) format.
Key Insights and Ideas
- Optimizing for SAT Solving Complexity: The core idea is that traditional EDA optimization metrics (area, delay) don't directly translate to SAT solving efficiency. By explicitly optimizing for metrics like branching complexity, they can create instances that SAT solvers can tackle much faster.
- RL for Logic Synthesis Recipes: Using RL to discover optimal sequences of logic synthesis operations is a powerful way to tailor circuits for a specific downstream task (SAT solving), rather than relying on fixed or heuristic-based synthesis flows.
- Branching Complexity as a Cost Metric: Quantifying and minimizing the branching complexity of logic gates (especially those like XOR gates that are known to be challenging for SAT solvers) is a novel approach to make the resulting CNF more tractable.
- Synergy of EDA and ML: The paper demonstrates how combining established EDA techniques (logic synthesis, LUT mapping) with modern machine learning (RL) can lead to significant improvements in solving complex problems.
Key Results
- Significant Runtime Reductions: The proposed framework achieved up to 63% reduction in solving time compared to baseline approaches (conventional CNF conversion) on a set of 300 industrial benchmarks.
- Comparison with Existing Methods: The method also outperformed a prior circuit-based preprocessing approach (Comp.) by 35.16%.
- Effectiveness of RL Agent: An ablation study showed that the RL-guided logic synthesis reduced solving time by 11.95% compared to a random selection of synthesis operations.
- Effectiveness of Cost-Customized Mapper: Replacing the custom mapper with a conventional one (optimizing for area/delay) resulted in a 50.80% increase in solving time, highlighting the importance of the cost-customized approach.
- Seamless Integration: The framework integrates seamlessly with state-of-the-art SAT solvers like Kissat and CaDiCaL.
Limitations and Future Work
- Limitations: The paper focuses on combinational circuits. The runtime limitation for solving instances was set at 1000s, with timeouts marked as 1000s. The training dataset consisted of "easy" instances, which might not fully capture the complexity of all "hard" instances.
- Future Work: The authors suggest extending the approach to sequential circuits and exploring its application to broader EDA problems beyond CSAT. They also mention the possibility of incorporating additional synthesis operations into the RL agent's action space.
Summary updated