a theory-based decision heuristic for dpll(t)

29
A theory-based decision heuristic for DPLL(T) Dan Goldwasser Ofer Strichman Shai Fine Haifa university Technion IBM-HRL

Upload: kevork

Post on 19-Jan-2016

26 views

Category:

Documents


0 download

DESCRIPTION

A theory-based decision heuristic for DPLL(T). Dan Goldwasser Ofer Strichman Shai Fine Haifa university TechnionIBM-HRL. DPLL. full assignment. Decide. SAT. partial assignment. Backtrack. BCP. Analyze conflict. conflict. UNSAT. DPLL( T ). full assignment. Decide. SAT. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: A theory-based decision heuristic for DPLL(T)

A theory-based decision heuristic for DPLL(T)

Dan Goldwasser Ofer Strichman Shai Fine Haifa university TechnionIBM-HRL

Page 2: A theory-based decision heuristic for DPLL(T)

DPLL

Decide

BCPAnalyze conflict

Backtrack

SAT

UNSAT

full assignment

partial assignment

conflict

Page 3: A theory-based decision heuristic for DPLL(T)

DPLL(T)

Decide

BCP

Deduction Add Clauses

Analyze conflict

Backtrack

SAT

UNSAT

full assignment

partial assignment

conflict

T-propagation / T-conflict

Page 4: A theory-based decision heuristic for DPLL(T)

Theory propagation

Matters for efficiency, not correctness. Depending on the theory, the best strategy can be:

No T-implications

One T-implication at a time

All possible T-implications (“exhaustive theory-

propagation”).

Cheap-to-compute T-implications

In the case of Linear Real Arithmetic (LRA) … None.

Page 5: A theory-based decision heuristic for DPLL(T)

We will see:

The potential of theory propagation

Why doesn’t it work today

How can it be approximated efficiently

Speculations: can the theory lead the way ?

Outline

Page 6: A theory-based decision heuristic for DPLL(T)

A geometric interpretation Let H be a finite set of hyperplanes in d dimensions. Let n

= |H|

An arrangement of H, denoted A(H), is a partition of Rd.

An arrangement in d=2:

# cells · O(nd)

Page 7: A theory-based decision heuristic for DPLL(T)

A geometric interpretation

Consider a consistent partial assignment of size r. e.g. assignment to (l1,l2,l3), hence r =3.

How many such T-implications are there ?

2l

3l

l1current partial

assignment

(1,0,0)

r = 3

l4

l5

T-Implied

Page 8: A theory-based decision heuristic for DPLL(T)

A geometric interpretation

Consider a consistent partial assignment of size r .

Theorem 1: O((n ¢ log r) /r) of the remaining constraints intersect the cell [HW87] with high probability (1 - 1/rc).

Some example numbers: r = 3, ~47% of the remaining constraints are implied. r = 12, ~70% of the remaining constraints are implied. r = 60, ~90% of the remaining constraints are implied.

[HW87] D. Haussler and E. Welzl. Epsilon-nets and simplex range queries. Comput. Geom., 2:127- 151, 1987.

Page 9: A theory-based decision heuristic for DPLL(T)

Assigned vs. implied in practice

Two benchmarks. Measured averages at T-consistent points

Page 10: A theory-based decision heuristic for DPLL(T)

Theory propagation for LRA

Let l1, l2, l3 be asserted. Is l4 (or :l4) T-implied ?

Two techniques for finding T-implications.

1.“Plunging”: check satisfiability of (l1 Æ l2 Æ l3 Æ l4) and of (l1 Æ l2 Æ l3 Æ :l4)

Requires solving a linear system.

Too expensive in practice (see e.g. [DdM06]).

[DdM06] Integrating simplex with DPLL(T), Dutertre and De Moura, SRI-CSL-06-01

Page 11: A theory-based decision heuristic for DPLL(T)

Theory propagation for LRA

Let l1, l2, l3 be asserted. Is l4 (or :l4) T-implied ?

Two techniques for finding T-implications.

2. Check if all vertices on the same side of l4

There is an exponential number of vertices.

Too expensive in practice.

Page 12: A theory-based decision heuristic for DPLL(T)

Approximating theory propagation

Problem 1: How can we use conjectured information without losing soundness ?

Problem 2: how can we find (cheaply) good conjectures i.e., conjectured T-implications

Page 13: A theory-based decision heuristic for DPLL(T)

Problem 1: how to use conjectures ? We use conjectured implications just to bias

decisions.

SAT chooses a variable to decide, we conjecture its value. SAT’s heuristics are T-ignorant.

Page 14: A theory-based decision heuristic for DPLL(T)

Problem 2: conjecturing T-implications We examined two methods: 1. k - vertices

Find k-vertices. If they are all on the same side of l4 – conjecture that l4

is implied.

l4

In this case we conjecture :l4

Page 15: A theory-based decision heuristic for DPLL(T)

Problem 2: conjecturing T-implications We examined two methods: 1. k - vertices

Find k-vertices. If they are all on the same side of l4 – conjecture that l4

is implied.

l4

In this case we conjecture nothing

Page 16: A theory-based decision heuristic for DPLL(T)

Problem 2: conjecturing T-implications We examined two methods: 1. k - vertices

Find k-vertices. If they are all on the same side of l4 – conjecture that l4

is implied.

l4

In this case we (falsely) conjecture l4

Page 17: A theory-based decision heuristic for DPLL(T)

Problem 2: conjecturing T-implications We examined two methods: 1. k - vertices

Find k-vertices. If they are all on the same side of l4 – conjecture that l4

is implied.

Too expensive in practice

Page 18: A theory-based decision heuristic for DPLL(T)

Problem 2: conjecturing T-implications We examined two methods: 2.One approximated point

Here we always conjecture a T-implication.

l4

Page 19: A theory-based decision heuristic for DPLL(T)

Problem 2: conjecturing T-implications We examined two methods: 2.One approximated point

Here we always conjecture a T-implication.

l4

Page 20: A theory-based decision heuristic for DPLL(T)

Problem 2: conjecturing T-implications We examined two methods: 2.One approximated point

Here we always conjecture a T-implication.

l4

Page 21: A theory-based decision heuristic for DPLL(T)

Problem 2: conjecturing T-implications We examined two methods: 2.One approximated point

The idea: use the assignment maintained by Simplex. It’s for free.

l4

Page 22: A theory-based decision heuristic for DPLL(T)

Problem 2: conjecturing T-implications We examined two methods: 2.One approximated point

The idea: use the assignment maintained by Simplex. It’s for free.

Competitive SMT solvers Do not activate (general) Simplex after each

assignment They only update the assignment according to the

‘simple’ constraints (e.g. “x < c”).

Page 23: A theory-based decision heuristic for DPLL(T)

Problem 2: conjecturing T-implications

Several possibilities:

is T-inconsistent

is T-consistent doesn’t satisfy it

is T-consistent satisfies it

22%

Page 24: A theory-based decision heuristic for DPLL(T)

Problem 2: conjecturing T-implications Our hope: is ‘close’ to the polygon. Therefore it can be successful in guessing

implications.

Even if l4 is not T-implied, can guide the search.

l4

Page 25: A theory-based decision heuristic for DPLL(T)

Results

Some results for the 200 benchmarks from SMT-COMP’07

Implementation on top of ArgoLib

Each column refers to a different strategy of choosing the value.

Page 26: A theory-based decision heuristic for DPLL(T)

0-pivot vs. MinisatMiniSat

Page 27: A theory-based decision heuristic for DPLL(T)

The bigger picture # of cells is exponential in d rather than exponential in n

nd rather than 2n

In the SMT-LIB benchmark set, on average n = 10 d.

Page 28: A theory-based decision heuristic for DPLL(T)

A reversed lazy approach ?

Current SAT-based ‘lazy’ approaches Search the Boolean domain check assignment in the

theory domain A ‘reversed lazy approach’:

Search the theory domain check assignment in the Boolean domain

T-solver

SAT

Page 29: A theory-based decision heuristic for DPLL(T)

Summary

We studied LRA from the perspective of computational geometry.

We showed efficient (approximated) theory propagation.

We showed how approximated information can be used safely.

Future research: How can we let the theory lead the search ?