Efficient sampling of satisfying formulas for circuit satisfiability (CircuitSAT), a well-known NP-complete problem, is essential in modern front-end applications for thorough testing and verification of digital circuits. Generating such samples is a hard computational problem due to the inherent complexity of digital circuits, size of the search space, and resource constraints involved in the process. Addressing these challenges has prompted the development of specialized algorithms that heavily rely on heuristics. However, these heuristic-based approaches frequently encounter scalability issues when tasked with sampling from a larger number of solutions, primarily due to their sequential nature. Different from such heuristic algorithms, we propose a novel differentiable sampler for multi-level digital circuits, called {\sc Demotic}, that utilizes gradient descent (GD) to solve the CircuitSAT problem and obtain a wide range of valid and distinct solutions. {\sc Demotic} leverages the circuit structure of the problem instance to learn valid solutions using GD by re-framing the CircuitSAT problem as a supervised multi-output regression task. This differentiable approach allows bit-wise operations to be performed independently on each element of a tensor, enabling parallel execution of learning operations, and accordingly, GPU-accelerated sampling with significant runtime improvements compared to state-of-the-art heuristic samplers. We demonstrate the superior runtime performance of {\sc Demotic} in the sampling task across various CircuitSAT instances from the ISCAS-85 benchmark suite. Specifically, {\sc Demotic} outperforms the state-of-the-art sampler by more than two orders of magnitude in most cases.
翻译:高效采样电路可满足性问题(CircuitSAT)——一个著名的NP完全问题——的满足解,对于现代前端应用中数字电路的全面测试与验证至关重要。由于数字电路固有的复杂性、搜索空间的规模以及采样过程中涉及的资源限制,生成此类样本是一个困难的计算问题。应对这些挑战催生了严重依赖启发式方法的专用算法。然而,这些基于启发式的方法在需要从大量解中进行采样时,常因其顺序执行的本质而面临可扩展性问题。与此类启发式算法不同,我们提出了一种新颖的用于多级数字电路的可微分采样器,称为{\sc Demotic},它利用梯度下降法求解CircuitSAT问题并获得广泛有效且互异的解。{\sc Demotic}通过将CircuitSAT问题重构为有监督的多输出回归任务,利用问题实例的电路结构,借助梯度下降法学习有效解。这种可微分方法允许对张量的每个元素独立执行按位运算,从而实现学习操作的并行执行,并相应地利用GPU加速采样,相比最先进的启发式采样器在运行时间上取得了显著提升。我们在ISCAS-85基准测试套件的多种CircuitSAT实例上验证了{\sc Demotic}在采样任务中卓越的运行性能。具体而言,在大多数情况下,{\sc Demotic}的性能超越当前最优采样器两个数量级以上。