Clause Sharing and Partitioning for Cloud-Based SMT Solving Matteo - - PowerPoint PPT Presentation

clause sharing and partitioning for cloud based smt
SMART_READER_LITE
LIVE PREVIEW

Clause Sharing and Partitioning for Cloud-Based SMT Solving Matteo - - PowerPoint PPT Presentation

Facolt Universit di scienze della informatiche Svizzera italiana Clause Sharing and Partitioning for Cloud-Based SMT Solving Matteo Marescotti, Antti E. J. Hyvrinen, and Natasha Sharygina Universit della Svizzera italiana


slide-1
SLIDE 1

Università della Svizzera italiana Facoltà di scienze informatiche

Matteo Marescotti, Antti E. J. Hyvärinen, and Natasha Sharygina

Università della Svizzera italiana Switzerland

Clause Sharing and Partitioning for Cloud-Based SMT Solving

SMT@IJCAR2016

slide-2
SLIDE 2

▪ Software verification tasks are a source of computationally challenging problems. ▪ SMT solvers are often used as backend for software verification techniques. ▪ Given a way to parallelise SMT solver, it would be possible to speedup software verification. ▪ Parallel computing in e.g. economics and physics-related domains has been a huge success: run time reduced from years to days. ▪ Parallel constraint solving has only recently gained success ▪ Heule et al.: Solving and Verifying the boolean Pythagorean Triples problem via Cube-and-Conquer, to appear at SAT16

Why parallel SMT

2

slide-3
SLIDE 3

▪ Portfolio [BCD11, WHM09]: ▪ The concurrent execution of a set of solvers. ▪ Each solver has a different initial seed. ▪ Divide and Conquer [REI14]: ▪ Creation of a set of partitions 𝐺1, … , 𝐺n ▪ sat(𝐺 ) ⟺ sat(𝐺1 ⋁ … ⋁ 𝐺n) ⟺ sat(𝐺1) ⋁ … ⋁ sat(𝐺n) ▪ First proved sat proves sat, all proved unsat proves unsat. ▪ Clause Sharing [WHM09]: ▪ Feature of parallel SAT/SMT techniques. ▪ Used to prevent the search on already explored space.

Related work on parallel SMT solving

3

[BCD11] Barrett et al.: CVC4. 2011. [WHM09] Wintersteiger et al.: A concurrent portfolio approach to SMT solving. 2009. [REI14] Reisenberger et al.: PBoolector: a parallel SMT solver for QF_BV […]. 2014.

slide-4
SLIDE 4

4

✴ data from two SAT instances solved with MiniSAT 100 times

▪ Parallel approaches try to take advantage from randomness. ▪ Formulas with a more widespread run-time distribution are better suited for Portfolio.

Portfolio

slide-5
SLIDE 5

▪ Given a number of partitions n, partitioning tries to formulate n partitions such that each partition’s search space is equal. ▪ Each partition is created by constraining the input formula with new clauses. ▪ Scattering based on VSIDS (Variable State Independent Decaying Sum) ▪ Formula is solved for a fixed amount of time. ▪ We choose the literals which appear most during conflict analysis (VSIDS) to construct the partitions. ▪ Lookahead

Partitioning

5

slide-6
SLIDE 6

▪ Depending on how the division is done, the performance might be dramatically different.

Partitioning

6

✴ data from OpenSMT2: splitting NEQ016_size8 QF_UF benchmark with VSIDS and lookahead

slide-7
SLIDE 7

▪ A new clause 𝑑 ⇐ 𝑮 is learnt by: ▪ SAT solver on every conflict. ▪ Theory Solver which periodically checks if the current propositional assignment is consistent with the theory. ▪ Learnt clauses are used to guide the search.

Learned clauses in DPLL(T)

7

slide-8
SLIDE 8

▪ Clause sharing helps the solving of: ▪ unsat to produce an unsat set of clauses. ▪ sat to reduce the number of assignment. ▪ Clause sharing could slow down all the solvers due to the high throughput of learnt clauses. ▪ More critical the more the number of solvers increases. ▪ Heuristics must be used to choose what is worth sharing. ▪ All solvers must have the same internal representation of the formula for clause sharing to be sound.

Clause sharing in DPLL(T) [MHS16]

8

[MHS16] M. Marescotti, A. E. J. Hyvärinen, and N. Sharygina. Clause Sharing and Partitioning for Cloud-Based SMT Solving. to appear at ATVA 2016, proc.

slide-9
SLIDE 9

▪ Server / Workers modular design. ▪ Load balancing: as simpler partitions are solved, solvers are assigned to unsolved partitions in a fair way.

Parallel Solver [HMS15, MHS16]

9

...

FIFO Channel

Filter Heuristic

Server Clause DB

Selection Heuristic C l u s t e r Head node

Client

SMT Solver

Client

SMT Solver

Client

SMT Solver C , C , ... ,C

1 2 n

C , C , ... ,C

1 2 n

C , C , ... ,C

1 2 n

Partition Heuristic Input instances

[HMS15] A. E. J. Hyvärinen, M. Marescotti, and N. Sharygina. Search-space partitioning for parallelizing SMT solvers. SAT 2015, Proceedings. [MHS16] M. Marescotti, A. E. J. Hyvärinen, and N. Sharygina. Clause Sharing and Partitioning for Cloud-Based SMT Solving. to appear at ATVA 2016, proc.

slide-10
SLIDE 10

▪ The modular system runs in a computing cloud. ▪ Partition heuristics: ▪ The VSIDS-based heuristic used in MiniSat. ▪ A look-ahead heuristic. ▪ Filter heuristic: ▪ Statically based on clause size ▪ Selection heuristic: ▪ Random fixed number of clauses ▪ SMT Solver: ▪ OpenSMT supporting QF_UF and QF_LRA.

Parallel Solver [HMS15, MHS16]

10

[HMS15] A. E. J. Hyvärinen, M. Marescotti, and N. Sharygina. Search-space partitioning for parallelizing SMT solvers. SAT 2015, Proceedings. [MHS16] M. Marescotti, A. E. J. Hyvärinen, and N. Sharygina. Clause Sharing and Partitioning for Cloud-Based SMT Solving. to appear at ATVA 2016, proc.

slide-11
SLIDE 11

▪ SMT solver represent the instance as DAG of terms. ▪ Several simplifications applied. The result is a set of clauses. ▪ Hard to connect the clauses and the DAG representation. ▪ We solve this by having a binary format that describes the state of the solver. ▪ Binary format used both for learned clauses and the clauses used as constraints. ▪ Our naïve implementation consists of a memory dump. ▪ As a downside it is difficult to plug in other solvers to the framework.

Binary format for SMT

11

slide-12
SLIDE 12

s1

Experiments

12

64 s2 32 32

[HMS15] A. E. J. Hyvärinen, M. Marescotti, and N. Sharygina. Search-space partitioning for parallelizing SMT solvers. SAT 2015, Proceedings.

s8

8 8

… ▪ Combination using the parallelisation tree framework [HMS15].

slide-13
SLIDE 13

▪ Works better with pure portfolio.

Experiments: Clause Sharing

13 10 100 1000 10 100 1000 ti s1

10 100 1000 10 100 1000 ti s8 10 100 1000 10 100 1000 ti s2

✴ data from OpenSMT2 Parallel Framework using 8 nodes on QF_UF and QF_LRA benchmarks. s1: Portfolio of 64 solvers. s2: Partition in 2 and portfolio of 32 on each. s8: Partition in 8 and portfolio of 8 on each.

2.05x 1 more QF_LRA 9 more QF_UF 1.97x 1 more QF_LRA 7 more QF_UL 1.67x 0 more QF_LRA 4 more QF_UF

slide-14
SLIDE 14

Experiments: Clause Sharing Heuristics

14

10 100 1000 10 100 1000 timeout s1 CS (filter > 30) s1

s1: portfolio of 64 solvers s1 CS: portfolio of 64 solvers with clause sharing

✴ data from OpenSMT2 Parallel Framework using 8 nodes on QF_LRA benchmarks. [MHS16] Matteo Marescotti, Antti E. J. Hyvärinen, and Natasha Sharygina. Clause Sharing and Partitioning for Cloud-Based SMT Solving. to appear at ATVA 2016, proc.

QF_LRA

10 100 1000 10 100 1000 s1 CS s1 timeout

QF_LRA

slide-15
SLIDE 15

Experiments: Against sequential

15

10 100 1000 10 100 1000 timeout s1 CS OpenSMT2 10 100 1000 10 100 1000 timeout s1 CS Z3

s1 CS: portfolio of 64 solvers with clause sharing

✴ data from OpenSMT2 Parallel Framework using 8 nodes on QF_UF and QF_LRA benchmarks.

slide-16
SLIDE 16

▪ Loose clause sharing heuristics result in slowdown: ▪ how to improve these heuristics. ▪ Full iterative partitioning support in the implementation: ▪ currently limited to the first level. ▪ Global clause sharing: ▪ now limited to the tree rooted at the node who learnt them. ▪ Integration in model checker. ▪ OpenSMT2 GIT Repo at: https://scm.ti-edu.ch/repogit/opensmt2.git

Future work

16