Distributed On-the-Fly Resolution of Boolean Equation Systems

4 downloads 0 Views 172KB Size Report
Traversals of very large BES (the larger is the BES, the more resolution ... 5. If variable of interest stabilizes, then resolution terminates. C. Joubert, R. Mateescu.
Distributed On-the-Fly Resolution of Boolean Equation Systems C. Joubert

R. Mateescu

INRIA Rhône-Alpes / VASY http://www.inrialpes.fr/vasy SENVA’2005 (Montbonnot, France) November 16-17

C. Joubert, R. Mateescu

SENVA’2005

1/ 22

Outline

1. Boolean Equation Systems (B ES) Local Resolution of B ES Related Work 2. Distributed Local Resolution of B ES Distributed Algorithm DS OLVE Implementation and Experiments

C. Joubert, R. Mateescu

SENVA’2005

2/ 22

Boolean Equation Systems (B ES)

B ESs, Boolean Graphs, and Local Sequential Resolution x1 x2 x3 x4 x5 x6

µ

= x2 ∨ x3 µ = x4 ∨ x5 µ = x2 ∧ x5 ∧ x6 µ = x4 ∧ x5 µ =T µ = x3 ∨ x1

x1 ∨ x2

x3 ∧

∨ ∧ x4

C. Joubert, R. Mateescu

∧x5

x6 ∨

I

σ

B ES {xi = opi Xi }1≤i≤n Set of boolean fixed point equations Pure disjunctive or conjunctive formulas Absence of negations to ensure monotonicity of least fixed point

I

Boolean graph G = (V , E, L) associated to a B ES V = {x1 , ..., xn } E = {(xi , xj )|xj Xi } L : V → {∨, ∧}, L(xi ) = opi SENVA’2005

4/ 22

Boolean Equation Systems (B ES)

B ES Application Areas

Verification of concurrent systems I

Equivalence checking [Andersen-Vergauwen-95]

I

Model-checking [Andersen-94]

I

Partial order reduction [Pace-Lang-Mateescu-03]

Propositional logic programming I

Horn clauses satisfiability [Liu-Smolka-98]

C. Joubert, R. Mateescu

SENVA’2005

5/ 22

Boolean Equation Systems (B ES)

Motivation for Distributed B ES Resolution 1

Limitation of Sequential B ES Resolution Methods Memory I

B ES with more than 108 variables to solve (current sequential machines swap around 107 variables)

Time I

x1 ∨

Traversals of very large B ES (the larger is the B ES, the more resolution tasks will have the process)

1

x3 ∧

x4 ∧

2 x2 ∨

x5 ∧

3 x6 ∨

communication network

C. Joubert, R. Mateescu

2

Reasons for Distribution Running faster with few memory used per machine Regular problem prone to balanced distribution of tasks and data SENVA’2005

6/ 22

Boolean Equation Systems (B ES)

Related Work

Distributed Local Resolution using Game Graphs [Bollig-Leucker-Weber-02] I

I

Algorithm specialized for model checking properties expressed in a fragment of the modal µ-calculus Operates on game graphs (⇒ Alternative representation to boolean graphs) Vertices = configurations in two-player games Edges = moves

I

Effective speedups obtained for model checking

C. Joubert, R. Mateescu

SENVA’2005

8/ 22

Distributed Local Resolution of B ES

The DS OLVE Algorithm Computation model I Distributed memory architecture (message passing): N OW , cluster of P C I P S PMD processes and 1 coordinator process I Each process solves a subset of boolean variables determined by a static hash function Distributed algorithm I Forward exploration of boolean graph (V , E, L) starting at a variable of interest xV I Backward propagation of stable (computed) variables I Distribution (communication) of variables through remote dependencies I Termination detection when x stable or boolean graph entirely solved C. Joubert, R. Mateescu

SENVA’2005

10/ 22

Distributed Local Resolution of B ES

Execution of DS OLVE on previous B ES example 1

Initialization (variable of interest x1 )

2

Local expansion and remote expansion (message E XP)

3

Conjunctive variable whithout successor (i.e., constant true)

4

Local and remote (message E VL) back-propagation of stabilized (i.e., computed) variables

5

If variable of interest stabilizes, then resolution terminates

x 2) 1,

x1 true P(x ∨ EX x3 , x2 ) x2 true E V L(x1 ∧ ∨ E XP(x2 , x4 )

5)

x 6)

C. Joubert, R. Mateescu

x2

,x

5)

,x

x2

P(

EV

x 3,

P(

P3

EX

EX

x4 ∧ x5 true ∧

P2

L(

P1

x6 ∨

SENVA’2005

11/ 22

Distributed Local Resolution of B ES

Distributed Termination Detection Algorithm Principle I Two waves of global inactivity detection between the coordinator and the resolution processes

K(

AC

) ) mp ) sta stamp mp K( sta AC K( AC

C. Joubert, R. Mateescu

K(

1 Inactivity detection

Inactivity detection and confirmation PP 1 inactivei = P ∧ Pi=1 P i=0 senti − recvi = 0

AC

[C]

v 3) ) rec recv 2 − v 1) − rec nt 3 − (se (sent 2 nt 1 IDL (se IDL

[P1 ]

IDL

[P2 ]

ACK(stamp) AC K(sta mp) sta mp )

[P3 ]

AC

T

2 Inactivity confirmation

2

nb(ACK(stamp)) = P ∧ stamp = current_stamp

SENVA’2005

12/ 22

Distributed Local Resolution of B ES

Complexity Results For a boolean graph (V , E, L) and P running processes: I

Worst-case time complexity = O(|V | + |E|) 2 intertwined graph traversals (forward and backward)

I

Worst-case memory complexity = O(|V | + |E|) Dependencies stored during graph exploration

I

Worst-case message complexity = O(2 · |E| · (P − 1)/P) 2 messages (expansion and stabilization) at most exchanged by edges

I

Distributed termination detection = O(|E| · 3 · P) 2 waves with 3 · P messages at most exchanged by edge

C. Joubert, R. Mateescu

SENVA’2005

13/ 22

Distributed Local Resolution of B ES

Distributed Software Architecture DS OLVE (10,000 lines of C code) is based on: I

Prototype generic communication library (4000 lines of C code) enabling communication through T CP/I P sockets

I

Generic O PEN /C ÆSAR environment for on-the-fly graph exploration [Garavel-98], part of the C ADP verification toolbox (www.inrialpes.fr/vasy/cadp)

I

Generic boolean resolution A PI given by the library C ÆSAR _S OLVE [Mateescu-03]

I

Available under S OLARIS, L INUX, W INDOWS and M AC OS operating systems

C. Joubert, R. Mateescu

SENVA’2005

15/ 22

Distributed Local Resolution of B ES

Platform Architecture Experiments performed on homogeneous parallel architectures (N OW and clusters of P C), among which:

C. Joubert, R. Mateescu

I

I DPOT (http://idpot.imag.fr) 48 Bi-Xeon 2.5 GHz 1.5 Gb

I

IC LUSTER (http://icluster.imag.fr) 216 PIII 733 MHz 256 Mb

SENVA’2005

16/ 22

Distributed Local Resolution of B ES

Experiments Random B ES Solver O PEN /C ÆSAR and C ÆSAR _S OLVE libraries

C compiler

random B ES solver (.exe)

true / false coordinator communication network (T CP /I P sockets)

random B ES solver (.exe)

I

Example of small application of DS OLVE (1000 lines of C code)

I

Enables to test the performance of DS OLVE

I

Produces B ES (represented by the successor function of their corresponding boolean graph) according to various parameters which vary randomly in a given domain

random B ES solver (implicit boolean graph (.c))

random B ES solver (.exe)

random B ES solver (.exe) 1

2

3 nodes

C. Joubert, R. Mateescu

SENVA’2005

17/ 22

Distributed Local Resolution of B ES

Speedup in the Worst Case I

almost no alternation (2%), hence long path of ∨ (or ∧) variables ended by a constant T (or F) (1%) encountered in model checking (C TL, ACTL, P DL) encountered in equivalence checking involving deterministic graphs

18 2e+06 4e+06 6e+06 8e+06 1e+07 1e+06 100000 10000 1.2e+07 1.4e+07 1.6e+07 Ideal speedup

16

14

Speedup

12

Worst case class of B ES:

10

8

6

4

2

I

0 0

2

4

6

8

10

Number of nodes

C. Joubert, R. Mateescu

12

14

16

18

Quasi-linear speedup compared to the sequential breadth-first search algorithm of C ÆSAR _S OLVE SENVA’2005

18/ 22

Distributed Local Resolution of B ES

Scalability I

Good scalability with the number of machines, as well as with the size of the BES to solve

I

Experimented DS OLVE on more than 80 machines on IC LUSTER

I

Solved 240 · 106 of variables and 1 · 109 operators in 28 minutes with 17 machines for a BES with 0% constant and 0% alternation

2.5e+08 p=3 p=5 p=7 p=9 p=11 p=13 p=15 p=17

2e+08

Variables

1.5e+08

1e+08

5e+07

0 0

200

400

600

800

1000

Time (sec)

C. Joubert, R. Mateescu

1200

1400

1600

1800

SENVA’2005

19/ 22

Distributed Local Resolution of B ES

Memory and Communication Cost

I

Low memory overhead of distributed resolution compared to memory allocated for data

I

Perfect load balancing achieved by the static hash function

I

High communication cost due to numerous cross-dependencies ((P − 1)/P) · |E|

I

Low percentage (0, 01%) of termination detection messages over all exchanged messages

C. Joubert, R. Mateescu

SENVA’2005

20/ 22

Summary

Summary I

DS OLVE: a new distributed local B ES resolution algorithm

I

Generic implementation within the C ADP verification toolbox

I

Linear worst-case time and memory complexity DS OLVE algorithm

I

Extensive set of experiments showing linear speedups and good scalability

I

Ongoing work Generalizing DS OLVE to B ES having several blocks of equations with acyclic inter-block dependencies Developing other applications over DS OLVE, e.g. resolution of Horn clauses, model-checking and test case generation

C. Joubert, R. Mateescu

SENVA’2005

21/ 22

Appendix

For Further Reading D. Bergamini, N. Descoubes, C. Joubert and R. Mateescu. B ISIMULATOR: A Modular Tool for On-the-Fly Equivalence Checking. TACAS’2005, LNCS 3440:581–585. C. Joubert and R. Mateescu. Distributed Local Resolution of Boolean Equation Systems. PDP’2005, p264–271, IEEE Computer Society Press. C. Joubert and R. Mateescu. Distributed On-the-Fly Equivalence Checking. PDMC’2004, ENTCS 128(3):47–62. R. Mateescu. A Generic On-the-Fly Solver for Alternation-Free Boolean Equation Systems. TACAS’2003, LNCS 1443:53–66.

http://www.inrialpes.fr/vasy

C. Joubert, R. Mateescu

SENVA’2005

22/ 22