PARALLEL RECURSIVE STATE COMPRESSION FOR FREE ALFONS LAARMAN JOINT WORK WITH: MICHAEL WEBER JACO VAN DE POL 12/7/2011 SPIN 2011
Motivation Previous work Problem Description Background Tree Compression Contribution Concurrent Tree Compression An Incremental Algorithm Analysis of Compression Ratios Experiments Conclusion / Future Work 12/7/2011Parallel Recursive State Compression for Free 1 OVERVIEW
(Enumerative) reachability as a basis for many verification problems S: open set (stack or queue) DB: closed set 12/7/2011Parallel Recursive State Compression for Free 2 MOTIVATION PREVIOUS WORK
S4:S4: 12/7/ PREVIOUS WORK MOTIVATION Parallel Recursive State Compression for Free DB Worker 1 Worker 2 Worker 3 Worker 4 request Lockless hash table Synchronous Random Polling post() S1:S1: S3:S3: S2:S2: [FMCAD 2010]
12/7/ PROPERTIES OF THE LOCKLESS HASH TABLE MOTIVATION Parallel Recursive State Compression for Free Monotonically growing (no remove() operation) find_or_put(vector) : boolean Without resizing Avoid scalability problem Stable indices: find_or_put(vector) : (index, boolean) Fixed-sized integer vectors (limitation of LTSmin)
12/7/ MEMORY BECOMES THE PROBLEM (AGAIN) MOTIVATION Parallel Recursive State Compression for Free The hash set has to store up to 10^9 state vectors of length up to 1 kbyte With 16 cores: 1GB/sec ofnew state vectors In asynchronous systems, transitions are typically local: States are very similar Solution: Compress the DB Cf. COLLAPSE in SPIN Exploit locality with incremental algorithms
Motivation Previous work Problem Description Background Tree Compression Contribution Concurrent Tree Compression An Incremental Algorithm Analysis of Compression Ratios Experiments Conclusion / Future Work 12/7/2011Parallel Recursive State Compression for Free 6 OVERVIEW
12/7/ MEMORY-EFFICIENT STORAGE BACKGROUND Parallel Recursive State Compression for Free
12/7/ TREE COMPRESSION BACKGROUND Parallel Recursive State Compression for Free Store a table of vectors as a fixed-shaped tree of tables with tuples
12/7/ TREE COMPRESSION BACKGROUND Parallel Recursive State Compression for Free
12/7/ TREE COMPRESSION ALGORITHM BACKGROUND Parallel Recursive State Compression for Free returns (index, bool) Used before in distributed model checking – Blom et al.
12/7/2011Parallel Recursive State Compression for Free 11 CONFLICTING REQUIREMENTS PROBLEM DESCRIPTION Goal: scalable concurrent tree database Unknown table sizes requires resizing breaks stable indices
Motivation Previous work Problem Description Background Tree Compression Contribution Concurrent Tree Compression An Incremental Algorithm Analysis of Compression Ratios Experiments Conclusion / Future Work 12/7/2011Parallel Recursive State Compression for Free 12 OVERVIEW
12/7/2011Parallel Recursive State Compression for Free 13 INTRODUCE MAXIMAL SHARING CONCURRENT TREE COMPRESSION Idea: Merge all hash tables into a single non-resizing hash table. This maintains an injection T k : Nat k Nat T 2 (4,1) = 1 T 6 (3,5,5,4,1,3) = 7 T 3 (4,1,3) = 4
12/7/2011Parallel Recursive State Compression for Free 14 INTRODUCE MAXIMAL SHARING CONCURRENT TREE COMPRESSION Idea: Merge all hash tables into a single non-resizing hash table. Problem: T 6 (….) = T 2 (3,5)
12/7/2011Parallel Recursive State Compression for Free 15 INTRODUCE MAXIMAL SHARING CONCURRENT TREE COMPRESSION Solution: add an isRoot tag to nodes For correct boolean result
12/7/ THE ALGORITHM CONCURRENT TREE COMPRESSION Parallel Recursive State Compression for Free
12/7/2011Parallel Recursive State Compression for Free 17 INCREMENTAL TREE INSERTION CONCURRENT TREE COMPRESSION Hash tablevs Tree 1 (random) memory access of k integers (k-1) (random) accesses of two integers Next problem:
12/7/ INCREMENTAL TREE INSERTION CONCURRENT TREE COMPRESSION Parallel Recursive State Compression for Free Exploits locality (log 2 (k) accesses in many cases) post( ) =
Motivation Previous work Problem Description Background Tree Compression Contribution Concurrent Tree Compression An Incremental Algorithm Analysis of Compression Ratios Experiments Conclusion / Future Work 12/7/2011Parallel Recursive State Compression for Free 19 OVERVIEW
20 WORST AND BEST CASE INPUTS ANALYSIS OF COMPRESSION RATIOS Parallel Recursive State Compression for Free Inputs Tuples in tree nodesRatio Worst case: Best case: k n
12/7/ MEMORY USAGE EXPERIMENTS Parallel Recursive State Compression for Free [BEEM database]
12/7/ MEMORY USAGE EXPERIMENTS Parallel Recursive State Compression for Free Always compression with tree In most cases, compression is close to optimal (see median) Always higher ratios than COLLAPSE
12/7/ RUNTIMES COMPARED TO HASH TABLE EXPERIMENTS Parallel Recursive State Compression for Free Performance close to HT Due to incremental algorithm
12/7/ SCALABILITY EXPERIMENTS (AGGREGATE SPEEDUPS) EXPERIMENTS Parallel Recursive State Compression for Free
With paying careful attention to data layout, we designed a parallel on- the-fly compression method, that features: Impressive compression ratios Good performance/scalability For the full BEEM benchmark database 12/7/2011Parallel Recursive State Compression for Free 25 CONCLUSION
12/7/2011Parallel Recursive State Compression for Free 26 FUTURE WORK Support dynamic-sized vectors Overcome hardware limitations (2 billion vectors due to CAS) use compact hash table (Cleary) Static reordering of vector slots to improve compression ratios Also Multi-Core LTL Model Checking (ATVA 2011 / PDMC 14:00) Implemented in LTSmin (open source):
12/7/2011Parallel Recursive State Compression for Free 27 AN INTUITION ANALYSIS OF COMPRESSION RATIOS