Robert Könighofer SAT-Based Methods for Circuit Synthesis SAT-Based Methods for Circuit Synthesis* October 22, 2014 Roderick Bloem Uwe Egly Patrick Klampfl Florian Lonsing Robert Könighofer * This work was supported in part by the Austrian Science Fund (FWF) through the national research network RiSE (S11406-N23, S11409-N23) and the project QUAINT (I774-N23), as well as by the European Commission through project STANCE (317753). u www.iaik.tugraz.at u www.iaik.tugraz.at
Robert Könighofer SAT-Based Methods for Circuit Synthesis 2 What is Synthesis? Specification: What? Implementation: How? Walk to Moserhofgasse From: Graz, Synthesis Tram 6 to Jakominiplatz Inffeldgasse Buy tram ticket To: Lausanne, 6pm Tram 3 to train station Graz Buy train ticket Train to Salzburg Train to Zürich Train to Launsanne Walk to Lausanne Fon FMCAD And so on … FMCAD 2014 Lausanne, October 22
Robert Könighofer SAT-Based Methods for Circuit Synthesis 3 Reactive Synthesis Specification: Implementation: Temporal Logic Reactive system Environment always( 𝑠 1 → eventually( 1 )) r 1 g 1 r 2 g 2 always( 𝑠 2 → eventually( 2 )) System never( 1 ∧ 2 ) Synthesis FMCAD 2014 Lausanne, October 22
Robert Könighofer SAT-Based Methods for Circuit Synthesis Typical Synthesis Flow 4 always( 𝑗 1 → eventually( 𝑝 1 )) Specification i 1 Game Environment System o 1 IF THEN Inputs 𝑗 Outputs 𝑝 Strategy i 1 i 2 o 1 o 2 Formula 𝑇(𝑗 , 𝑝 ) 0 0 1 - 1 1 0 1 Focus of 0 0 this work And so on … 𝑝 𝑗 ? FF Circuit FMCAD 2014 Lausanne, October 22
Robert Könighofer SAT-Based Methods for Circuit Synthesis Challenges 5 Scalability Symbolic algorithms Traditionally: BDDs This work: SAT/QBF Find small circuits Low number of gates Exploit freedom in 𝑇 𝑗 , 𝑝 wisely Our work: Comparison of SAT/QBF-based methods Optimizations FMCAD 2014 Lausanne, October 22
Robert Könighofer SAT-Based Methods for Circuit Synthesis Method 1: 6 QBF Certification Given: ∀𝑗 : ∃𝑝 :𝑇(𝑗 , 𝑝 ) Find: Skolem function 𝑝 = 𝑔(𝑗 ) Existing Tool: QBFCert [SAT’12] FMCAD 2014 Lausanne, October 22
Robert Könighofer SAT-Based Methods for Circuit Synthesis Method 2: 7 Interpolation [ICCAD’09 ] For one output after the other: Construct formulas mustBeTrue(𝑗 ) , mustBeFalse 𝑗 mustBeTrue 𝑗 ∧ mustBeFalse 𝑗 = UNSAT Compute Interpolant 𝐽(𝑗 ) mustBeTrue 𝑗 → 𝐽 𝑗 → ¬mustBeFalse 𝑗 mustBeFalse 𝐽(𝑗 ) mustBeTrue FMCAD 2014 Lausanne, October 22
Robert Könighofer SAT-Based Methods for Circuit Synthesis Method 3: 8 Computational Learning [FMCAD’12] For one output after the other: Construct formulas mustBeTrue(𝑗 ) , mustBeFalse 𝑗 mustBeTrue 𝑗 ∧ mustBeFalse 𝑗 = UNSAT “ Learn ” Interpolant 𝐽(𝑗 ) Counterexample-guided refinement Many options: SAT or QBF, … FMCAD 2014 Lausanne, October 22
Robert Könighofer SAT-Based Methods for Circuit Synthesis Results: 9 Execution Time Cactus Plot 10000 Interpolation BDDs QBF Learning Execution Time [sec] 1000 QBF SAT Learning Cert 100 10 1 Benchmarks FMCAD 2014 Lausanne, October 22
Robert Könighofer SAT-Based Methods for Circuit Synthesis Results: 10 Circuit Size Cactus Plot 1000000 SAT Interpolation Interpolation BDDs BDDs Learning 1 QBF Learning QBF 100000 Cert Circuit Size [#Gates] QBF 10000 QBF SAT Cert Learning Learning 2 1000 SAT Learning 100 10 Benchmarks Benchmarks FMCAD 2014 Lausanne, October 22
Robert Könighofer SAT-Based Methods for Circuit Synthesis Conclusions 11 SAT-based learning works best Execution time and circuit size correlate Check out the paper for details Optimizations More results Implementation is available: http://www.iaik.tugraz.at/content/research/design_verification/demiurge/ FMCAD 2014 Lausanne, October 22
Robert Könighofer SAT-Based Methods for Circuit Synthesis References 12 [SAT’12] A. Niemetz, M. Preiner, F. Lonsing, M. Seidl, and A. Biere. Resolution- based certificate extraction for QBF. In SAT’12. Springer, 2012. [ICCAD’09] J.-H. R. Jiang, H.-P. Lin, and W.-L. Hung. Interpolating functions from large boolean relations. In ICCAD’09. IEEE, 2009. [FMCAD’12 ] R. Ehlers, R. Könighofer, and G. Hofferek. Symbolically synthesizing small circuits. In FMCAD’12. IEEE, 2012 FMCAD 2014 Lausanne, October 22
Recommend
More recommend