optimal storage of combinatorial state spaces
play

Optimal Storage of Combinatorial State Spaces Alfons Laarman ( - PowerPoint PPT Presentation

Optimal Storage of Combinatorial State Spaces Alfons Laarman ( alfons@laarman.com ) Theory Group, LIACS . 1 / 25 Optimal Storage of Combinatorial State Spaces Optimal Compression u u + w + k Uncompressed Information Theory This


  1. Optimal Storage of Combinatorial State Spaces Alfons Laarman ( alfons@laarman.com ) Theory Group, LIACS . 1 / 25 Optimal Storage of Combinatorial State Spaces

  2. Optimal Compression u u + ǫ w + ǫ k Uncompressed Information Theory This paper 2 / 25 Optimal Storage of Combinatorial State Spaces

  3. Model Checking 3 / 25 Optimal Storage of Combinatorial State Spaces

  4. Enumerative Model Checking Example (Peterson mutex protocol) bool flag[2] = { 0,0 } ; 1 bool turn = 0; 2 1 flag[0] = 1; 1 flag[1] = 1; 2 turn = 1; 2 turn = 0; 3 !flag[1] || turn==0; 3 !flag[0] || turn==1; /* critical section */ /* critical section */ flag[0] = 0; goto 1; flag[1] = 0; goto 1; 4 4 Transition System ( S , I ,δ ) 4 / 25 Optimal Storage of Combinatorial State Spaces

  5. Enumerative Model Checking Example (Peterson mutex protocol) bool flag[2] = { 0,0 } ; 1 bool turn = 0; 2 1 flag[0] = 1; 1 flag[1] = 1; 2 turn = 1; 2 turn = 0; 3 !flag[1] || turn==0; 3 !flag[0] || turn==1; /* critical section */ /* critical section */ flag[0] = 0; goto 1; flag[1] = 0; goto 1; 4 4 Transition System ( S , I ,δ ) • S : � pc 1 , pc 2 , flag [ 0 ] , flag [ 1 ] , turn � 4 / 25 Optimal Storage of Combinatorial State Spaces

  6. Enumerative Model Checking Example (Peterson mutex protocol) bool flag[2] = { 0,0 } ; 1 bool turn = 0; 2 1 flag[0] = 1; 1 flag[1] = 1; 2 turn = 1; 2 turn = 0; 3 !flag[1] || turn==0; 3 !flag[0] || turn==1; /* critical section */ /* critical section */ flag[0] = 0; goto 1; flag[1] = 0; goto 1; 4 4 Transition System ( S , I ,δ ) • S : � pc 1 , pc 2 , flag [ 0 ] , flag [ 1 ] , turn � • I := {� 1 , 1 , 0 , 0 , 0 �} 4 / 25 Optimal Storage of Combinatorial State Spaces

  7. Enumerative Model Checking Example (Peterson mutex protocol) bool flag[2] = { 0,0 } ; 1 bool turn = 0; 2 1 flag[0] = 1; 1 flag[1] = 1; 2 turn = 1; 2 turn = 0; 3 !flag[1] || turn==0; 3 !flag[0] || turn==1; /* critical section */ /* critical section */ flag[0] = 0; goto 1; flag[1] = 0; goto 1; 4 4 Transition System ( S , I ,δ ) • S : � pc 1 , pc 2 , flag [ 0 ] , flag [ 1 ] , turn � • I := {� 1 , 1 , 0 , 0 , 0 �} • Defining δ : • δ ( � 1 , 1 , 0 , 0 , 0 � ) = 4 / 25 Optimal Storage of Combinatorial State Spaces

  8. Enumerative Model Checking Example (Peterson mutex protocol) bool flag[2] = { 0,0 } ; 1 bool turn = 0; 2 1 flag[0] = 1; 1 flag[1] = 1; 2 turn = 1; 2 turn = 0; 3 !flag[1] || turn==0; 3 !flag[0] || turn==1; /* critical section */ /* critical section */ flag[0] = 0; goto 1; flag[1] = 0; goto 1; 4 4 Transition System ( S , I ,δ ) • S : � pc 1 , pc 2 , flag [ 0 ] , flag [ 1 ] , turn � • I := {� 1 , 1 , 0 , 0 , 0 �} • Defining δ : • δ ( � 1 , 1 , 0 , 0 , 0 � ) = {� 2 , 1 , 1 , 0 , 0 � , � 1 , 2 , 0 , 1 , 0 �} • δ ( � 2 , 1 , 1 , 0 , 0 � ) = ... , etc 4 / 25 Optimal Storage of Combinatorial State Spaces

  9. Enumerative Model Checking � 1 , 1 , 0 , 0 , 0 � peterson( i ∈ { 0 , 1 } ) Reachability from I := {� 1 , 1 , 0 , 0 , 0 �} • S : � pc 1 , pc 2 , flag [ 0 ] , flag [ 1 ] , turn � 1 flag[i] = 1; 2 turn = 1 − i; 3 !flag[1 − i] || turn==i; / � critical section � / 4 flag[i] = 0; goto 1; 5 / 25 Optimal Storage of Combinatorial State Spaces

  10. Enumerative Model Checking � 1 , 1 , 0 , 0 , 0 � � 2 , 1 , 1 , 0 , 0 � � 1 , 2 , 1 , 0 , 0 � peterson( i ∈ { 0 , 1 } ) Reachability from I := {� 1 , 1 , 0 , 0 , 0 �} • S : � pc 1 , pc 2 , flag [ 0 ] , flag [ 1 ] , turn � 1 flag[i] = 1; 2 turn = 1 − i; 3 !flag[1 − i] || turn==i; / � critical section � / 4 flag[i] = 0; goto 1; 5 / 25 Optimal Storage of Combinatorial State Spaces

  11. Enumerative Model Checking � 1 , 1 , 0 , 0 , 0 � � 2 , 1 , 1 , 0 , 0 � � 1 , 2 , 1 , 0 , 0 � � 2 , 2 , 1 , 1 , 0 � � 3 , 1 , 1 , 0 , 1 � � 1 , 3 , 0 , 1 , 0 � � 3 , 2 , 1 , 1 , 1 � � 2 , 3 , 1 , 1 , 0 � � 4 , 1 , 1 , 0 , 1 � � 1 , 4 , 0 , 1 , 0 � � 3 , 3 , 1 , 1 , 1 � � 3 , 3 , 1 , 1 , 0 � � 4 , 2 , 1 , 1 , 1 � � 2 , 4 , 1 , 1 , 0 � � 3 , 4 , 1 , 1 , 1 � � 4 , 3 , 1 , 1 , 0 � peterson( i ∈ { 0 , 1 } ) Reachability from I := {� 1 , 1 , 0 , 0 , 0 �} • S : � pc 1 , pc 2 , flag [ 0 ] , flag [ 1 ] , turn � 1 flag[i] = 1; 2 turn = 1 − i; 3 !flag[1 − i] || turn==i; / � critical section � / 4 flag[i] = 0; goto 1; 5 / 25 Optimal Storage of Combinatorial State Spaces

  12. Enumerative Model Checking � 1 , 1 , 0 , 0 , 0 � � 2 , 1 , 1 , 0 , 0 � � 1 , 2 , 1 , 0 , 0 � � 2 , 2 , 1 , 1 , 0 � � 3 , 1 , 1 , 0 , 1 � � 1 , 3 , 0 , 1 , 0 � � 3 , 2 , 1 , 1 , 1 � � 2 , 3 , 1 , 1 , 0 � � 4 , 1 , 1 , 0 , 1 � � 1 , 4 , 0 , 1 , 0 � � 3 , 3 , 1 , 1 , 1 � � 3 , 3 , 1 , 1 , 0 � � 4 , 2 , 1 , 1 , 1 � � 2 , 4 , 1 , 1 , 0 � � 3 , 4 , 1 , 1 , 1 � � 4 , 3 , 1 , 1 , 0 � peterson( i ∈ { 0 , 1 } ) Reachability from I := {� 1 , 1 , 0 , 0 , 0 �} • S : � pc 1 , pc 2 , flag [ 0 ] , flag [ 1 ] , turn � 1 flag[i] = 1; 2 turn = 1 − i; • Reachability from I 3 !flag[1 − i] || turn==i; • Check invariant ϕ � ¬ ( pc 1 = pc 2 = 4 ) / � critical section � / 4 flag[i] = 0; goto 1; 5 / 25 Optimal Storage of Combinatorial State Spaces

  13. Enumerative Model Checking � 1 , 1 , 0 , 0 , 0 � � 2 , 1 , 1 , 0 , 0 � � 1 , 2 , 1 , 0 , 0 � � 2 , 2 , 1 , 1 , 0 � � 3 , 1 , 1 , 0 , 1 � � 1 , 3 , 0 , 1 , 0 � � 3 , 2 , 1 , 1 , 1 � � 2 , 3 , 1 , 1 , 0 � � 4 , 1 , 1 , 0 , 1 � � 1 , 4 , 0 , 1 , 0 � � 3 , 3 , 1 , 1 , 1 � � 3 , 3 , 1 , 1 , 0 � � 4 , 2 , 1 , 1 , 1 � � 2 , 4 , 1 , 1 , 0 � � 3 , 4 , 1 , 1 , 1 � � 4 , 3 , 1 , 1 , 0 � peterson( i ∈ { 0 , 1 } ) Reachability from I := {� 1 , 1 , 0 , 0 , 0 �} • S : � pc 1 , pc 2 , flag [ 0 ] , flag [ 1 ] , turn � 1 flag[i] = 1; 2 turn = 1 − i; • Reachability from I 3 !flag[1 − i] || turn==i; • Check invariant ϕ � ¬ ( pc 1 = pc 2 = 4 ) / � critical section � / 4 flag[i] = 0; goto 1; • Also: LTL, CTL, modal µ -calculus, etc 5 / 25 Optimal Storage of Combinatorial State Spaces

  14. Locality in Model Checking 1 1 0 0 0 Example (Peterson) 2 1 1 0 0 1 flag[i] = 1; 3 1 1 0 1 2 turn = 1 − i; 4 1 1 0 1 3 !flag[1 − i] || turn==i; 1 1 0 0 1 / � critical section � / 4 flag[i] = 0; goto 1; 6 / 25 Optimal Storage of Combinatorial State Spaces

  15. Locality in Model Checking 1 1 0 0 0 Example (Peterson) 2 1 1 0 0 1 flag[i] = 1; 3 1 1 0 1 2 turn = 1 − i; 4 1 1 0 1 3 !flag[1 − i] || turn==i; 1 1 0 0 1 / � critical section � / 4 flag[i] = 0; goto 1; Observations • Locality 6 / 25 Optimal Storage of Combinatorial State Spaces

  16. Locality in Model Checking 1 1 0 0 0 Example (Peterson) 2 1 1 0 0 1 flag[i] = 1; 3 1 1 0 1 2 turn = 1 − i; 4 1 1 0 1 3 !flag[1 − i] || turn==i; 1 1 0 0 1 / � critical section � / 4 flag[i] = 0; goto 1; Observations • Locality • Combinatorial (Similar vectors of size k · u bit) 6 / 25 Optimal Storage of Combinatorial State Spaces

  17. Analysis of Compression Potential 7 / 25 Optimal Storage of Combinatorial State Spaces

  18. Claude Shannon (1916 — 2001) “Father of Information Theory” 8 / 25 Optimal Storage of Combinatorial State Spaces

  19. Information Theory Refresher Information Entropy • Encoding a random English text takes log 2 ( ± 30 ) bit/char 9 / 25 Optimal Storage of Combinatorial State Spaces

  20. Information Theory Refresher Information Entropy • Encoding a random English text takes log 2 ( ± 30 ) bit/char • How some characters occur more frequent than others • Idea: use shorter bit patterns to encode frequent characters 9 / 25 Optimal Storage of Combinatorial State Spaces

  21. Information Theory Refresher Information Entropy • Encoding a random English text takes log 2 ( ± 30 ) bit/char • How some characters occur more frequent than others • Idea: use shorter bit patterns to encode frequent characters • H ( A ) = − Σ α ∈ A p ( α )log 2 ( p ( α )) bits 9 / 25 Optimal Storage of Combinatorial State Spaces

  22. Optimum Compression � 1 , 1 , 0 , 0 , 0 , 0 � � 1 , 2 , 0 , 0 , 0 , 0 � � 1 , 2 , 0 , 1 , 2 , 0 � Information theoretical lower bound � � � � v 1 1 ,... v 1 v 2 1 ,... v 2 • View states as stream: , ,... K K 10 / 25 Optimal Storage of Combinatorial State Spaces

  23. Optimum Compression p ( k − 1 p ( 1 k ) k ) � 1 , 1 , 0 , 0 , 0 , 0 � � 1 , 2 , 0 , 0 , 0 , 0 � � 1 , 2 , 0 , 1 , 2 , 0 � Information theoretical lower bound � � � � v 1 1 ,... v 1 v 2 1 ,... v 2 • View states as stream: , ,... K K • p ( v i j � v i − 1 ) = 1 ( locality! ) k j j = v i − 1 ) = k − 1 • p ( v i j k 10 / 25 Optimal Storage of Combinatorial State Spaces

  24. Optimum Compression p ( k − 1 p ( 1 k ) k ) � 1 , 1 , 0 , 0 , 0 , 0 � � 1 , 2 , 0 , 0 , 0 , 0 � � 1 , 2 , 0 , 1 , 2 , 0 � Information theoretical lower bound � � � � v 1 1 ,... v 1 v 2 1 ,... v 2 • View states as stream: , ,... K K • p ( v i j � v i − 1 ) = 1 ( locality! ) k j j = v i − 1 ) = k − 1 • p ( v i j k • Entropy per state ≈ u + log 2 ( k ) + ǫ bits 10 / 25 Optimal Storage of Combinatorial State Spaces

Recommend


More recommend