p reprocessing in i ncremental sat
DESCRIPTION
P reprocessing in i ncremental SAT. Alexander Nadel 1 , Vadim Ryvchin 1,2 , and Ofer Strichman 2 1 – Intel, Haifa, Israel 2 – Technion, Haifa, Israel. SAT’12, Trento, Italy. Introduction. Incremental SAT is at the core of a variety of applications - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/1.jpg)
Preprocessing in Incremental SATAlexander Nadel1, Vadim Ryvchin1,2, and Ofer Strichman2
1 – Intel, Haifa, Israel2 – Technion, Haifa, Israel
SAT’12, Trento, Italy
![Page 2: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/2.jpg)
Introduction Incremental SAT is at the core of a variety of applications
Preprocessing is essential for SAT’s performance• … but is not compatible with incremental SAT
We propose a way to make them compatible • thus increasing the capacity of SAT-based tools and algorithms
![Page 3: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/3.jpg)
Incremental SAT Initial Formula: First incremental Call: Nth incremental call:
– Input formula at call – New input clauses added at call
![Page 4: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/4.jpg)
SatELite Preprocessing Main techniques:
• Variable elimination• Subsumption/Self-subsuming resolution
Variable Elimination:
• If > save() else save()o Done to extend SAT assignment
The problem in combining SatELite with incremental SAT:• Eliminated variables might reappear in new input clauses
![Page 5: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/5.jpg)
The Problem
-------------------------------------------------------------------------------Elimination of variable : Now Solver returns: SAT: -------------------------------------------------------------------------------Incremental call:
Solver returns: But: – is not satisfied by .
![Page 6: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/6.jpg)
Previous Approaches1. No preprocessing at all2. Full preprocessing
• After each invocation return the eliminated clauses• Redo preprocessing
3. Look Ahead:• Do not eliminate “problematic” variables
Preprocessing is essential for performance In many cases look ahead is not possible
![Page 7: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/7.jpg)
Definitions – Input formula at call – Formula at the end of call
• Formula comprises clauses managed by the solver – Saved clauses for eliminated variable – New input clauses added at call – initially , modified by incremental preprocessing – all clauses in containing
![Page 8: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/8.jpg)
Incremental Preprocessing
PreprocessSolve // might run in-process
![Page 9: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/9.jpg)
Incremental Preprocessing
For each eliminated variable in elimination order: if (*) // decide heuristically
Re-Eliminate else Re-IntroducePreprocessSolve // might run in-process
![Page 10: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/10.jpg)
Incremental Preprocessing
Remove subsumptions.For each eliminated variable in elimination order: if (*) // decide heuristically
Re-Eliminate else Re-IntroducePreprocessSolve // might run in-process
![Page 11: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/11.jpg)
Incremental Preprocess Re-Elimination (for example: of ):
• Perform resolutions between newly added clauses and saved ones ()
• Add the resolvents to the formula ()• Remove clauses ()• Update previously saved clauses ()
Re-Introduction (for example: of ):• Move (all clauses saved for ) back to the formula ()
![Page 12: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/12.jpg)
Data structure for Eliminated Variables
– Saved clauses containing variable
v1
v2
v3
v4
v5
…
S1
S2
S3
S4
S5
Clauses containing v3 but not v1 nor v2 may contain v4, v5, …
![Page 13: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/13.jpg)
Start
v1
v2
v3
v4
v5
…
S1
S2
S3
S4
S5
Δ𝑛Δ ′
![Page 14: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/14.jpg)
Step 1 – Examine v1
v1
v2
v3
v4
v5
…
S1
S2
S3
S4
S5 Re-Elimination
Δ𝑛Δ ′
![Page 15: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/15.jpg)
Step 1 – Re-Eliminate v1
v1
v2
v3
v4
v5
…
S1 = S1U
S2
S3
S4
S5
Δ ′𝑣1Δ ′ Δ ′ (S1 U
![Page 16: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/16.jpg)
Step 2
v1
v2
v3
v4
v5
…
S1 = S1 U
S2
S3
S4
S5
Δ ′
![Page 17: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/17.jpg)
Step 2 – Examine v2
v1
v2
v3
v4
v5
…
S1 = S1 U
S2
S3
S4
S5
Δ ′
Re-Elimination
![Page 18: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/18.jpg)
Step 2 – Re-Eliminate v2
v1
v2
v3
v4
v5
…
S1 = S1 U
S2 = S2 U
S3
S4
S5
Δ ′𝑣 2Δ ′ Δ ′ (S2 U
![Page 19: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/19.jpg)
Step 3
v1
v2
v3
v4
v5
…
S1 = S1 U
S2 = S2 U
S3
S4
S5
Δ ′
![Page 20: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/20.jpg)
Step 3 – Examine v3
v1
v2
v3
v4
v5
…
S1 = S1 U
S2 = S2 U
S3
S4
S5
Δ ′
Re-Introduction
![Page 21: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/21.jpg)
Step 3 – Re-Introduce v3
v1
v2
v3
v4
v5
…
S1 = S1 U
S2 = S2 U
S3
S4
S5
S3Δ ′ Δ ′
![Page 22: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/22.jpg)
Step 3 – Re-Introduce v3
v1
v2
v4
v5
…
S1 = S1 U
S2 = S2 U
S4
S5
S3Δ ′ Δ ′
May contain v4 and/or v5
![Page 23: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/23.jpg)
Our Example1. Input: 2. Preprocessing and Solution
• Elimination of .•
3. Incremental call with )
𝑎 𝑆1=𝑐1∧𝑐2
Δ ′ Δ1
![Page 24: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/24.jpg)
Our Example – Re-Elimination)
Perform Re-Elimination of variable :
= c4 Ʌ c5
𝑎 𝑆1=𝑐1∧𝑐2
![Page 25: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/25.jpg)
Our Example – Re-Elimination) )
Perform Re-Elimination of variable :
Δ ′ 𝑐5 𝑐4∧𝑐5𝑎 𝑆1=𝑐1∧𝑐2∧𝑐5
Δ ′ Δ ′𝑎 𝑅𝑒𝑠𝑎(𝑆𝑎∪ Δ′𝑎)
![Page 26: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/26.jpg)
Our Example – Re-Elimination) )
After Re-Elimination of variable :
Δ ′ 𝑐4∧𝑐6𝑎 𝑆1=𝑐1∧𝑐2∧𝑐5
![Page 27: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/27.jpg)
Our Example – Re-Elimination) )
So the new formula will look like:
Solve UNSAT
![Page 28: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/28.jpg)
Our Example1. Input: 2. Preprocessing and Solution
• Elimination of .•
3. Incremental call with )
𝑎 𝑆1=𝑐1∧𝑐2
Δ ′ Δ1
![Page 29: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/29.jpg)
Our Example – Re-Introduction)
Perform Re-Introduction of variable :
= c4 Ʌ c5
𝑎 𝑆1=𝑐1∧𝑐2
![Page 30: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/30.jpg)
Our Example – Re-Introduction)
Perform Re-Introduction of variable :
Δ ′ c1 Ʌ c2 𝑐4∧𝑐5𝑎 𝑆1=𝑐1∧𝑐2
Δ ′ 𝑆𝑎
![Page 31: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/31.jpg)
Our Example – Re-Introduction)
After Re-Introduction of variable :
Δ ′
![Page 32: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/32.jpg)
Our Example – Re-Introduction)
So the new formula will look like: Solve UNSAT
![Page 33: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/33.jpg)
Additional Improvements Variable elimination creates many resolvent clauses. If we Re-Introduce , can we delete ’s resolvents?
• No, it affects correctness
We can remove only resolvents that did not participate in subsumptions
![Page 34: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/34.jpg)
Example
• Elimination of : • Self-subsumption between and : • Self-subsumption between and : • Subsumption of and by • Re-Introduction of : returning and , removal of • So what left are .• ,
![Page 35: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/35.jpg)
Assumptions How to deal with assumption variables? Regular preprocessing:
• Freeze them (do not eliminate these variables). Incremental preprocessing:
• Freeze them (the same).• But what if variable was eliminated before?
o Must Re-Introduce. What if there are a lot of assumptions
• Our previous talk
![Page 36: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/36.jpg)
Experimental Results Benchmark Set:
• Implementation on top of Fiver (a new SAT solver under development at Intel).
• Large Bounded Model-checking instances from Intel divided into 4 different families.
• 206 different instances• Timeout: 4000sec
Machines:• Intel® Xeon® 4Ghz 32Gb of memory
![Page 37: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/37.jpg)
Experimental Results
![Page 38: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/38.jpg)
Experimental Results
Method Time-outs Avg. Total run-timeFull-preprocessing 68 2465.5
No-preprocessing 42 1784.7
Incremental-preprocessing 2 1221.3
Look-ahead 0 1064.9
![Page 39: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/39.jpg)
Incremental vs. No preprocessing
![Page 40: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/40.jpg)
Incremental vs. Full preprocessing
![Page 41: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/41.jpg)
Incremental vs. Look-ahead
![Page 42: P reprocessing in i ncremental SAT](https://reader035.vdocument.in/reader035/viewer/2022062501/56816711550346895ddb7b20/html5/thumbnails/42.jpg)
Thank You!