SlideShare une entreprise Scribd logo
1  sur  119
3. State Space Reduction
Plan

• Stubborn sets    [Petri Nets 1999]
• Symmetry         [Acta Informatica 2000]
• Invariants       [TACAS 2003]
• Sweep-Line       [TACAS 2004]
The Stubborn Set Method



                     3
Diamonds from concurrency


       a     b

       b
             a




                      4
Diamonds from concurrency


             s1
         a        b
     s                s’
         b
             s2   a




                           4
State Explosion by Concurrency
   Process A         Process B         Process C
                      internal         internal        1
    internal
                      internal         internal        2
    internal
    sync              sync             sync            3
                                                       4
                    111
        211          121              112
  311       221    131     212     122      113
312   321       231    222     132       213 123
  322          331    232        313        133        223
               332          323               233
                            333
                             444                   5
Stubborn Sets



                     111
         211          121               112
   311       221    131     212     122      113
312    321       231    222     132       213 123
  322      331     232      313     133     223
           332           323          233
                         333
                                        6
                          444
Stubborn Sets
In every marking m:
stubborn(m) ⊆ T
fire only activated transitions in stubborn(m)




                     111
         211          121               112
   311       221    131     212     122      113
312    321       231    222     132       213 123
    322         331         232        313      133     223
                332               323             233
                                  333
                                                   6
                                   444
Stubborn Sets
In every marking m:
stubborn(m) ⊆ T
fire only activated transitions in stubborn(m)

reduced transition system:


                     111
         211          121               112
   311       221    131     212     122      113
312    321       231    222     132       213 123
    322         331           232      313      133     223
                332                 323           233
                                    333
                                                   6
                                     444
Stubborn Sets
In every marking m:
stubborn(m) ⊆ T
fire only activated transitions in stubborn(m)

reduced transition system:


                     111
         211          121               112
   311       221    131     212     122      113
312    321       231    222     132       213 123
    322         331           232      313      133     223
                332                 323           233
                                    333
                                                   6
                                     444
Stubborn Sets
In every marking m:
stubborn(m) ⊆ T
fire only activated transitions in stubborn(m)

reduced transition system:


                     111
         211          121               112
   311       221    131     212     122      113
312    321       231    222     132       213 123
    322         331           232      313      133     223
                332                 323           233
                                    333
                                                   6
                                     444
Stubborn Sets
In every marking m:
stubborn(m) ⊆ T
fire only activated transitions in stubborn(m)

reduced transition system:


                     111
         211          121               112
   311       221    131     212     122      113
312    321       231    222     132       213 123
    322         331           232      313      133     223
                332                 323           233
                                    333
                                                   6
                                     444
Stubborn Sets
In every marking m:
stubborn(m) ⊆ T
fire only activated transitions in stubborn(m)

reduced transition system:


                     111
         211          121               112
   311       221    131     212     122      113
312    321       231    222     132       213 123
    322         331           232      313      133     223
                332                 323           233
                                    333
                                                   6
                                     444
Reduced Transition System


          111
           121
                   122
            222
                             223
            323
            333
                         7
             444
How to Preserve Properties
Core principle:
                              outside stubborn(m)


                       m2 implies


                             in stubborn(m)

        plus property specific requirements


     presence of right path justifies absence of left path
                                                            8
How to Preserve Properties
Core principle:
                               outside stubborn(m)


m      w1         m1 t   m2 implies


                              in stubborn(m)

        plus property specific requirements


     presence of right path justifies absence of left path
                                                            8
How to Preserve Properties
Core principle:
                               outside stubborn(m)


m      w1         m1 t   m2 implies m t   m1 ’     w1       m2


                              in stubborn(m)

        plus property specific requirements


     presence of right path justifies absence of left path
                                                            8
Preservation of Deadlocks
Core principle +
                            implies


Proof:




                                      9
Preservation of Deadlocks
 Core principle +
                                implies


 Proof:


Let       m         w       d     length(w) = min




                                          9
Preservation of Deadlocks
 Core principle +
                                                  implies


 Proof:


Let       m          w                        d     length(w) = min

1st case: some t of stubborn(m) occurs in w




                                                            9
Preservation of Deadlocks
 Core principle +
                                                  implies


 Proof:


Let       m          w                        d     length(w) = min

1st case: some t of stubborn(m) occurs in w
        m      w1       s1 t m2      w2       d



                                                            9
Preservation of Deadlocks
 Core principle +
                                                  implies


 Proof:


Let       m          w                        d     length(w) = min

1st case: some t of stubborn(m) occurs in w
        m      w1       s1 t m2      w2       d
        m t m1 ’       w1    m2      w2       d


                                                            9
Preservation of Deadlocks
 Core principle +
                                                  implies


 Proof:


Let       m          w                        d     length(w) = min

1st case: some t of stubborn(m) occurs in w
        m      w1       s1 t m2      w2       d      m1’ in red. TS,
        m t m1 ’       w1    m2      w2       d      closer to d!


                                                            9
Preservation of Deadlocks
 Core principle +
                                                  implies


 Proof:


Let       m          w                        d     length(w) = min

1st case: some t of stubborn(m) occurs in w
        m      w1       s1 t m2      w2       d      m1’ in red. TS,
        m t m1 ’       w1    m2      w2       d      closer to d!
2nd case: no t of stubborn(m) occurs in w

                                                            9
Preservation of Deadlocks
 Core principle +
                                                  implies


 Proof:


Let       m          w                        d     length(w) = min

1st case: some t of stubborn(m) occurs in w
        m      w1       s1 t m2      w2       d      m1’ in red. TS,
        m t m1 ’       w1    m2      w2       d      closer to d!
2nd case: no t of stubborn(m) occurs in w
        m              w                      d
                                                            9
Preservation of Deadlocks
 Core principle +
                                                  implies


 Proof:


Let       m          w                        d     length(w) = min

1st case: some t of stubborn(m) occurs in w
        m      w1       s1 t m2      w2       d      m1’ in red. TS,
        m t m1 ’       w1    m2      w2       d      closer to d!
2nd case: no t of stubborn(m) occurs in w
        m              w                      d
       t                                                    9
Preservation of Deadlocks
 Core principle +
                                                   implies


 Proof:


Let       m          w                        d      length(w) = min

1st case: some t of stubborn(m) occurs in w
        m      w1       s1 t m2      w2       d       m1’ in red. TS,
        m t m1 ’       w1    m2      w2       d       closer to d!
2nd case: no t of stubborn(m) occurs in w
        m              w                       d
       t                                      t              9
Preservation of Deadlocks
 Core principle +
                                                   implies


 Proof:


Let       m          w                        d      length(w) = min

1st case: some t of stubborn(m) occurs in w
        m      w1       s1 t m2      w2       d       m1’ in red. TS,
        m t m1 ’       w1    m2      w2       d       closer to d!
2nd case: no t of stubborn(m) occurs in w
        m              w                       d
                                              t        d not a
       t                                                  9
                                                       deadlock!
Preservation of Deadlocks
 Core principle + m              w                           m’
                                                   implies


 Proof:


Let       m           w                       d      length(w) = min

1st case: some t of stubborn(m) occurs in w
        m      w1       s1 t m2      w2       d       m1’ in red. TS,
        m t m1 ’       w1    m2      w2       d       closer to d!
2nd case: no t of stubborn(m) occurs in w
        m              w                       d
                                              t        d not a
       t                                                  9
                                                       deadlock!
Preservation of Deadlocks
 Core principle + m              w                           m’
                                                   implies
                  t

 Proof:


Let       m           w                       d      length(w) = min

1st case: some t of stubborn(m) occurs in w
        m      w1       s1 t m2      w2       d       m1’ in red. TS,
        m t m1 ’       w1    m2      w2       d       closer to d!
2nd case: no t of stubborn(m) occurs in w
        m              w                       d
                                              t        d not a
       t                                                  9
                                                       deadlock!
Preservation of Deadlocks
 Core principle + m              w                             m’
                                                   implies t
                  t

 Proof:


Let       m           w                       d      length(w) = min

1st case: some t of stubborn(m) occurs in w
        m      w1       s1 t m2      w2       d       m1’ in red. TS,
        m t m1 ’       w1    m2      w2       d       closer to d!
2nd case: no t of stubborn(m) occurs in w
        m              w                       d
                                              t        d not a
       t                                                  9
                                                       deadlock!
Preservation of LTL/CTL
LTLX:
Core principle
+Visibility: all transitions in stubborn(m) invisible to φ or
             stubborn(m) = T
+Proviso: Once in every cycle: stubborn(m) = T

CTLX:
LTL
+ |stubborn(m)| = 1 or stubborn(m) = T

Consequences:
- only local properties yield reduction
- Proviso avoids infinite stuttering
- Proviso known to cause explosion
- Proviso requires cycle detection (e.g. depth first)
- CTL only performant when number of conflicts is small
LoLA’s Approaches
Let φ be state predicate     Assume m does not satisfy φ

         wrup(m, φ ) = some set of transitions such that every path
         to an m’ that satisfies φ contains at least
         one transition of wrup(m, φ ).

Examples:
wrup(m, “m* reached”) = •p, for some p with m(p) < m*(p)
                              = p•, for some p with m(p) > m*(p)
wrup(m,p>k) = wrup(m,p≥k) = •p
wrup(m,p<k) = wrup(m,p≤k) = p•
wrup(m, φ1 ∧φ2) = wrup(m, φ1) if m does not satisfy φ1
                    = wrup(m, φ2) if m does not satisfy φ2
wrup(m, φ1 ∨φ2) = wrup(m, φ1)∪ wrup(m, φ2)
wrup(m, t not dead) = {t}                             11
Theorem
Reachability of φ:
core principle
+ wrup(m, φ) ⊆ stubborn(m)

    orig.                            φ
            red.




                      m




                    m0          12
Theorem
Reachability of φ:
core principle
+ wrup(m, φ) ⊆ stubborn(m)

    orig.                            φ
            red.




                      m




                    m0          12
Theorem
Reachability of φ:
core principle
+ wrup(m, φ) ⊆ stubborn(m)

    orig.                                   φ
            red.

                                in wrup(m, φ)

                      m




                    m0                 12
Theorem
Reachability of φ:
core principle
+ wrup(m, φ) ⊆ stubborn(m)

    orig.                                             φ
            red.

                                       in wrup(m, φ)

                             t 1st in ample(m)
                      m




                    m0                           12
Theorem
Reachability of φ:
core principle
+ wrup(m, φ) ⊆ stubborn(m)

    orig.                                              φ
            red.

                                        in wrup(m, φ)
                         m1
                              t 1st in ample(m)
                      m




                    m0                            12
Theorem
Reachability of φ:
core principle
+ wrup(m, φ) ⊆ stubborn(m)

    orig.                                                     φ
            red.

                                               in wrup(m, φ)
                         m1
                                     t 1st in ample(m)
                      m

                              m1 closer to m’ than m



                    m0                                   12
Effect
• Can be applied to global predicates
• Astonishing goal-orientation
• Has been relaxed by Kristensen/Valmari (wrup must
    be contained only once in an scc)
     •  They perform better if predicate unreachable
     •  Unrelaxed method better if predicate reachable
•   Can be extended to boundedness:
     •  Bounded net: wrup(m) = {t : |t•|>|•t|}
     •  Bounded place: wrup(m,p) = •p

relaxed
TSCC based properties
Valmari:
core principle
+ weak proviso: Every transition in stubborn(m) at
least once in every tscc of reduced system:
every tscc of original state space visited in reduced
state space
TSCC based properties
Idea:
- Construct Valmari’s tscc-preserving state space
- Pick one element of each tscc of reduced state space
        - check mutual reachability for home state
        - check reachability of m0 for reversibility
        - check rechability of φ for liveness of φ




                                                     userconfig.H:
twophase                                             TWOPHASE
CTL/LTL properties
•   CTL: Separate search space for each subformula
     •   Use wrup for EF and AG
     •   Use traditional CTL method for other
         operators

•   LTL: search counterexample path: F φ ➪ G¬φ,
    GF φ ➪ FG¬φ, FGφ ➪ GF¬φ
     •   G ¬φ LTL preserving, but drop Proviso

     •   FG¬φ,GF¬φ:

         •   drop Proviso if m satisfies ¬φ
         •   wrup(m,¬φ) if m satisfies φ
Symmetries
Symmetric Behavior
    Goal: symmetry in transition system


σ is symmetry if:                               ΣTS: set of all
σ is bijection R(m0)  R(m0)                 symmetries in R(m0)
m [t> m’ iff ex. t’: σ(m) t’> σ(m’)
σ(m0) = m0
                    by induction:
                 m0 m1 m2 ... path 
           σ(m0) σ(m1) σ(m2) ... path as well

            -Id is always symmetry                   [ΣTS,o] is
           -If σ symmetry, so is σ-1                   group
   -If σ1 and σ2 symmetries, so is σ1 o σ2
                                  18
Equivalence of States




          19
Equivalence of States
Have to detect symmetries prior to state space generation,
           typically cannot deduce all of them

but: can always close under inversion and composition




                           19
Equivalence of States
Have to detect symmetries prior to state space generation,
           typically cannot deduce all of them

but: can always close under inversion and composition

fix some subgroup Σ ⊆ ΣTS




                           19
Equivalence of States
Have to detect symmetries prior to state space generation,
           typically cannot deduce all of them

but: can always close under inversion and composition

fix some subgroup Σ ⊆ ΣTS


m ~ m’ iff ex. σ ∈ Σ such that σ(m) = m’


                           19
Equivalence of States
Have to detect symmetries prior to state space generation,
           typically cannot deduce all of them

but: can always close under inversion and composition

fix some subgroup Σ ⊆ ΣTS


m ~ m’ iff ex. σ ∈ Σ such that σ(m) = m’

 ~ is equivalence relation
                             19
Reduced Transition System


              TSΣ = [R(m0)/~ , EΣ , [m0]Σ]

EΣ = { [ [s],[s’] ] | ex. s ∈ [s], ex. s’ ∈ [s’] : [s,s’] ∈ E}

    Size of reduced system:

| R(m0)/~ | ≥ | R(m0) | / | Σ |

|Σ | can be exponential in size of Petri net


                                   20
Σ = { Id, σ}
                     Example
                σ([x,y,z]) =
           [y,x,z]

                        (i,i,1)

           (r,i,1)                   (i,r,1)
                                   g1
(c,i,0)                  (r,r,1)               (i,c,0)


              (c,r,0)                (r,c,0)

                              21
Example
 Σ = { Id, σ} σ([x,y,z]) =
            [y,x,z]

                        (i,i,1)

          (r,i,1)

(c,i,0)                  (r,r,1)


             (c,r,0)

                              22
Construction of reduced
 R := E := ø; dfs(m0);

 dfs(m)                                Approximation
 
 R := R ∪ {m};
 
 FOR ALL t: activated in m DO
              m’ = m + Δt;
 
 
 IF can find σ with σ(m’)∈ R THEN
 
 
         E := E ∪{[m, t, σ(m’) ]}; The “Orbit-
 
 
 ELSE                               Problem”
 
 
 
 E := E ∪{[m,t, m’ ]};
 
 
 
 dfs(m’);
 
 
 END
 
 END
                         23
“Traditional” Symmetry
         Tools
• Depend on “scalar set” data type
   • =, ≠, arrays, for each, no constant
• Cannot model networks other than cliques
• LoLA: can handle all kinds of symmetry in
  the net structure
PN automorphisms

Bijection σ: P∪T → P∪T is PN automorphism,
iff, for all x,y ∈ P∪T:
- m0(x) = m0(σ(x))
- If [x,y] ∈ F then [σ(x),σ(y)] ∈ F and W([x,y]) = W([σ(x),σ(y)])

    Every PN automorphism induces symmetry in state space:
                              σ(m)(σ(p)) = m(p)




                                 25
Example
                   2         3

                   1         4
11   11   12   12        13   13   14   14
22   24   21   23        22   24   21   23
33   33   34   34        31   31   32   32
44   42   43   41        44   42   43   41

 id



                        26
Schreier-Sims generating set
         U1
   U2




 U3     subgroup induces partition of whole group
        pick one element of each class (“orbit”)
Group: all automorphisms
U1: all automorphisms that map p1 to p1
U2: all automorphisms that map p1 to p1, p2 to p2
...
Un: Id

has O(n^2) elements
Example
                        2         3

                         1        4
11        11   12    12       13   13   14   14
22        24   21    23       22   24   21   23
33        33   34    34       31   31   32   32
44        42   43    41       44   42   43   41

 id
      U1

U2                           28
2      3
                    Example
 1     4
E={2 id, 3      2   ,3   2        3,       2   3
                                               ;
                id,         }
     1 g1 4     1 g2 4   1 g3 4            1 g4 4

 id o id   = id          g2 o id       =

    id o g4 =            g2 o g4 =

    g1 o id =            g3 o id =

    g1 o g4 =            g3 o g4 =

                             29
Another Example
        8        7
    5       6

        4        3        g = g1 o g2 o g3
   1         2

1.        Layer: 1 →1 ... 8
2.    Layer 1 → 1, 2 → 2,4,5
3. Layer 1 → 1, 2 → 2, 3 → 3,6

7 + 2 + 1 = 10 generators for
8 x 3 x 2 = 48 automorphisms
                                30
Orbit Problem: Approximation
                             id                    id

g11 g12 g13
                 g14-1   g21 g22 g23            g31 g32
    g14




    given: m   searched: canonical representative(m)




                                  31
Orbit Problem: Approximation
                                  id                id

g11 g12 g13
                  g14-1   g21 g22 g23            g31 g32
    g14




    given: m    searched: canonical representative(m)
1. m1 := MIN{g1i-1(m), i = ...}


                                       31
Orbit Problem: Approximation
                                   id               id

g11 g12 g13
                  g14-1   g21 g22 g23            g31 g32
    g14




    given: m    searched: canonical representative(m)
1. m1 := MIN{g1i-1(m), i = ...}
2. m2 := MIN{g2i-1(m1), i = ...}

                                        31
Orbit Problem: Approximation
                                   id               id

g11 g12 g13
                  g14-1   g21 g22 g23            g31 g32
    g14




    given: m    searched: canonical representative(m)
1. m1 := MIN{g1i-1(m), i = ...}
2. m2 := MIN{g2i-1(m1), i = ...}
3. m3 := MIN{g3i-1(m2), i = ...}
                                        31
Orbit Problem: Approximation
                                   id                          id

g11 g12 g13
                  g14-1   g21 g22 g23                      g31 g32
    g14




    given: m    searched: canonical representative(m)
1. m1 := MIN{g1i-1(m), i = ...}                          ........
2. m2 := MIN{g2i-1(m1), i = ...}             n. mn := MIN{gni-1(mn-1), i = ...}
3. m3 := MIN{g3i-1(m2), i = ...}
                                        31
Orbit Problem: Approximation
                                   id                       id

g11 g12 g13
                  g14-1   g21 g22 g23                   g31 g32
    g14




    given: m    searched: canonical representative(m)
1. m1 := MIN{g1i-1(m), i = ...}                       ........
2. m2 := MIN{g2i-1(m1), i = ...}          n. mn := MIN{gni-1(mn-1), i = ...}
3. m3 := MIN{g3i-1(m2), i = ...}          canrep(m) := mn
                                        31
2       3
                                     Example
                                      2                        2                  2
                      2          3                  3                     3                 3
    1       4
                    E={              ,                    ,                   ;                 }
                      1          4       1          4           1         4       1         4
                          g12                g13                    g14               g22
3               2
    2       3
        m                                                     32      32
                                id-1(m) = id(m) =
    1       4                                                  11    41
1               1                                             12     31
                                 -1(m)   =        (m) =
                                                              31     42
                                                              32     31
                                 -1(m)   =        (m) =
                                                              21      41
                                                              12      33
                                 -1(m)   =        (m) =
                                                              11      4 2
                                             32
2       3
                                     Example
                                      2                        2                  2
                      2          3                  3                     3                  3
    1       4
                    E={              ,                    ,                   ;                  }
                      1          4       1          4           1         4       1          4
                          g12                g13                    g14                g22
3               2
    2       3
        m                                                     32      32
                                id-1(m) = id(m) =
    1       4                                                  11    41
1               1                                             12     31
                                 -1(m)   =        (m) =
                                                              31     42
                                                              32     31
                                 -1(m)   =        (m) =
                                                              21      41
                                                              12      33
                                 -1(m)   =        (m) =                               ≠ m1
                                                              11      4 2
                                             32
2           3

                        2
                                      Example
                                       2                      2                     2
                                  3                 3                       3                 3
     1        4
                      E={             ,                 ,                       ;                 }
                        1         4       1         4             1         4       1         4
                            g12               g13                     g14               g22
 3                2
  2           3
         s                                                   12        33
                             id-1(m1) = id(m1) =
     1        4                                              11        42
 1                1

x = 12        3x = 3                                        22         33
         s1                       -1(m)   =    (m) =
x=11          4x = 2                                         11        41

                                              12        32
     Result    ≠ canrep(m) =          (m) =
                                              1 1       43
2           3

                        2
                                      Example
                                       2                      2                     2
                                  3                 3                       3                 3
     1        4
                      E={             ,                 ,                       ;                 }
                        1         4       1         4             1         4       1         4
                            g12               g13                     g14               g22
 3                2
  2           3
         s                                                   12        33
                             id-1(m1) = id(m1) =                                    Result
     1        4                                              11        42
 1                1

x = 12        3x = 3                                        22         33
         s1                       -1(m)   =    (m) =
x=11          4x = 2                                         11        41

                                              12        32
     Result    ≠ canrep(m) =          (m) =
                                              1 1       43
Summary Symmetries




symmetries   34
Summary Symmetries
calculation of symmetries, exact solution of orbit problem:
           equivalent to graph isomorphism (NP)




  symmetries                  34
Summary Symmetries
calculation of symmetries, exact solution of orbit problem:
           equivalent to graph isomorphism (NP)

Many other orbit algorithms available in LoLA, even more by
                      Tommi Junttila

    best choice depends on structure of symmetry group




  symmetries                  34
Using Petri net invariants
     in state space
Two approaches

compress states (use place invariants)
    save space and time

exempt states from storage (use transition invariants)
    space/time tradeoff




                         36
First approach: use place invariants




                 37
First approach: use place invariants


Let i be place invariant:.

For all reachable m:
i • m = i • m0




                             37
First approach: use place invariants


  Let i be place invariant:.

  For all reachable m:
  i • m = i • m0



                                              i • m0 – Σp’≠p i(p’) • m(p’)
.... and, for a place p with i(p) ≠ 0: m(p) =             i(p)


                                       37
Example
                              3       2


 invariant 1: [ 1 1 0 0 0 ]       invariant 2: [ 0 0 0 1 1 ]

that is, for all reachable markings m:
 m(p1) = 1 – m(p2)                       m(p5) = 2 – m(p4)


    only p2,p3,p4 need to be stored         (40 % compression)

                                    38
Overhead
preprocessing

   - time

   - space

 state space
construction

   - time



                   39
Overhead
                  appears to be:
preprocessing

   - time       compute invariants

   - space        |inv| • |places|

 state space
construction

   - time         recover saved
                   components

                                39
Overhead
                  appears to be:            actually is:
preprocessing

   - time       compute invariants   compute upper triangular
                                              form
   - space        |inv| • |places|       1bit • |places|

 state space
construction

   - time         recover saved      search, insert performed
                   components           on smaller vectors

                                39
State space construction
                    state

                     yes/no             state
                    pointer          depository
                                       (short
                                      vectors)
                  state (recover
               removed components)
       1        0           1
       0        0           0
   =   1
       0   -   -2
               -1     =     3
                            1
       2        1           1


                      40
State space construction
                  state

                  yes/no                 state
                 pointer              depository
                                        (short
                                       vectors)
                  state (recover
               removed components)
       1        0      1           Observe:
       0        0      0
   =   1
       0   -   -2
               -1  =   3
                       1
                                  values of i
                                  irrelevant,
       2        1      1
                               supp(i) sufficient!
                    40
Upper triangular form
    1 -1 0 0              1   0     0   0    .   .
   -1 1 0 0              -1   0     0   0    0   1
    0 3 -2 0              0   1     0   0    .   .
    0 0 -1 1              0   0    -1   0    .   .
    0 0 1 -1              0   0     1   0    1   0

incidence matrix      triangular form       invariants

    m(p2),m(p5) can be calculated from m(p1), m(p3), m(p4)




                                  41
Results
1. Space reduction 30% - 55%

2. Preprocessing time insignificant

3. Run time reduction proportional to space reduction

   Reason: search and insert operations take
   80 – 95 % of overall run time
   ... are now performed on shorter vectors

4. combination with most other reduction techniques
   possible

 preduction                    42
Second approach:




       43
Second approach:
  what happens if some states are
  removed from the depository?




           43
Second approach:
  what happens if some states are
  removed from the depository?




           43
Second approach:
    what happens if some states are
    removed from the depository?



  construction still terminates as long as
   removed states do not form cycles!




              43
Second approach:
    what happens if some states are
    removed from the depository?



  construction still terminates as long as
   removed states do not form cycles!

     use structural knowledge about cycles



              43
Transition invariants
cycle in state space corresponds to transition
                   invariant




                       44
Transition invariants
    cycle in state space corresponds to transition
                       invariant

Assume: Set U of transitions s.t. for every transition
                    invariant i:
                 U ∩ supp(i) ≠∅

   Then: store states that enable transitions in U
                 do not store other states

    U can be determined from triangular form
                         44
Example
                   3         2


    transition invariant: [2,2,3,3]

                U = {t}

store only states where t is enabled


                        45
Problems:
1. Too many states enable transitions in U

   Solution: combine with partial order reduction


2. Unacceptable run time overhead

   Solution 1: heuristically store additional states

   Solution 2: remove only non-branching states


                                 46
Ad 1: Full vs. Partial




    full state space
              47
Ad 1: Full vs. Partial




    stubborn set reduced state space
              48
Ad 2: store additional states

                    k




                    k



              49
Results
1. Controllable   space/time trade-off

2. Combination    with partial order reduction compulsory

3. Combination    with a few other reduction techniques
    possible

4. Only simple properties can be verified (no access to
    graph structure of the state space)

                               50
The Sweep-Line Method
Road map
The sweep-line method (basic/extended)

Calculation of a progress measure

Discussion
      - Combination with other reduction techniques
The sweep-line method (Basic)

Idea: state s →     progress value p(s)
with
         s [t> s‘      p(s) > p(s’)

         Unprocessed




             sweep-line
The sweep-line method (Basic)

Idea: state s →     progress value p(s)
with
         s [t> s‘      p(s) > p(s’)

         Unprocessed




             sweep-line                    p
The sweep-line method (Basic)

Idea: state s →     progress value p(s)
with
         s [t> s‘      p(s) > p(s’)

         Unprocessed




    Processed

             sweep-line                    p
The sweep-line method (Basic)

Idea: state s →     progress value p(s)
with
         s [t> s‘      p(s) > p(s’)

         Unprocessed


                          Not yet seen

    Processed

             sweep-line                    p
The sweep-line method (Basic)

Idea: state s →     progress value p(s)
with
         s [t> s‘      p(s) > p(s’)

         Unprocessed



                         Not yet seen

    Processed

             sweep-line                    p
The sweep-line method (extended)
If p is not monotonous:
                   t
            s’
                          s   p(s’) < p(s)
The sweep-line method (extended)
If p is not monotonous:
                   t
            s’
                          s             p(s’) < p(s)




             -mark s’ “persistent”
             -start new sweep from s’
The sweep-line method (extended)
    If p is not monotonous:
                       t
                s’
                              s             p(s’) < p(s)




                 -mark s’ “persistent”
                 -start new sweep from s’



Consequently: not too often p(s’) < p(s)
Setting for LoLA’s measure

-incremental: “transition offsets”
       Δ p(t) : m [t> m‘      p(m’) = p(m) + Δ p(t)


-not necessarily monotonous
  (in every cycle: one negative Δ p or all Δ p = 0)
The measure
partition T into U and TU

in U: all transitions linear independent
in TU: all transitions linear dependent of U
     i.e. |U| = rank(C)

-for t in U: Δ p (t) := 1
-for t in TU: Δ p(t) determined by (unique) lin. combination of U
     (for t in TU: Δ p(t) >0, =0, <0 )

typical size: |U| 60% - 100% of |T|
U
               Examples
TU




      1            1          1

2         -2              1


      1            1          0
Geometric interpretation
p2
          s




     p3




                                 p1
 sweep
Geometric interpretation
p2
            s




       p3


U

                                   p1
    sweep
Geometric interpretation
p2
            s




       p3


U

                                   p1
    sweep
Geometric interpretation
                   progress
p2
            s




       p3


U

                                   p1
    sweep
Geometric interpretation
                       progress
p2
            s

                p(s)



       p3


U

                                   p1
    sweep
Geometric interpretation
                       progress
p2
            s

                p(s)



       p3

        1
U

                                   p1
    sweep

Contenu connexe

Plus de Universität Rostock

Verification with LoLA: 7 Implementation
Verification with LoLA: 7 ImplementationVerification with LoLA: 7 Implementation
Verification with LoLA: 7 Implementation
Universität Rostock
 
Verification with LoLA: 6 Integrating LoLA
Verification with LoLA: 6 Integrating LoLAVerification with LoLA: 6 Integrating LoLA
Verification with LoLA: 6 Integrating LoLA
Universität Rostock
 
Verification with LoLA: 2 The LoLA Input Language
Verification with LoLA: 2 The LoLA Input LanguageVerification with LoLA: 2 The LoLA Input Language
Verification with LoLA: 2 The LoLA Input Language
Universität Rostock
 
Karsten Wolf @ Carl Adam Petri Memorial Symposium
Karsten Wolf @ Carl Adam Petri Memorial SymposiumKarsten Wolf @ Carl Adam Petri Memorial Symposium
Karsten Wolf @ Carl Adam Petri Memorial Symposium
Universität Rostock
 

Plus de Universität Rostock (20)

Where did I go wrong? Explaining errors in process models
Where did I go wrong? Explaining errors in process modelsWhere did I go wrong? Explaining errors in process models
Where did I go wrong? Explaining errors in process models
 
Decidability Results for Choreography Realization
Decidability Results for Choreography RealizationDecidability Results for Choreography Realization
Decidability Results for Choreography Realization
 
Artifact-centric modeling using BPMN
Artifact-centric modeling using BPMNArtifact-centric modeling using BPMN
Artifact-centric modeling using BPMN
 
Compliance by Design for Artifact-Centric Business Processes
Compliance by Design for Artifact-Centric Business ProcessesCompliance by Design for Artifact-Centric Business Processes
Compliance by Design for Artifact-Centric Business Processes
 
Verification with LoLA
Verification with LoLAVerification with LoLA
Verification with LoLA
 
Verification with LoLA: 7 Implementation
Verification with LoLA: 7 ImplementationVerification with LoLA: 7 Implementation
Verification with LoLA: 7 Implementation
 
Verification with LoLA: 6 Integrating LoLA
Verification with LoLA: 6 Integrating LoLAVerification with LoLA: 6 Integrating LoLA
Verification with LoLA: 6 Integrating LoLA
 
Verification with LoLA: 1 Basics
Verification with LoLA: 1 BasicsVerification with LoLA: 1 Basics
Verification with LoLA: 1 Basics
 
Verification with LoLA: 2 The LoLA Input Language
Verification with LoLA: 2 The LoLA Input LanguageVerification with LoLA: 2 The LoLA Input Language
Verification with LoLA: 2 The LoLA Input Language
 
Saarbruecken
SaarbrueckenSaarbruecken
Saarbruecken
 
Ws4 dsec talk @ Kickoff RS3
Ws4 dsec talk @ Kickoff RS3Ws4 dsec talk @ Kickoff RS3
Ws4 dsec talk @ Kickoff RS3
 
Internal Behavior Reduction for Services
Internal Behavior Reduction for ServicesInternal Behavior Reduction for Services
Internal Behavior Reduction for Services
 
Karsten Wolf @ Carl Adam Petri Memorial Symposium
Karsten Wolf @ Carl Adam Petri Memorial SymposiumKarsten Wolf @ Carl Adam Petri Memorial Symposium
Karsten Wolf @ Carl Adam Petri Memorial Symposium
 
Implementation of an Interleaving Semantics for TLDA
Implementation of an Interleaving Semantics for TLDAImplementation of an Interleaving Semantics for TLDA
Implementation of an Interleaving Semantics for TLDA
 
Formale Fundierung und effizientere Implementierung der schrittbasierten TLDA...
Formale Fundierung und effizientere Implementierung der schrittbasierten TLDA...Formale Fundierung und effizientere Implementierung der schrittbasierten TLDA...
Formale Fundierung und effizientere Implementierung der schrittbasierten TLDA...
 
Demonstration of BPEL2oWFN and Fiona
Demonstration of BPEL2oWFN and FionaDemonstration of BPEL2oWFN and Fiona
Demonstration of BPEL2oWFN and Fiona
 
service-technology.org — A tool family for correct
business processes and ser...
service-technology.org — A tool family for correct
business processes and ser...service-technology.org — A tool family for correct
business processes and ser...
service-technology.org — A tool family for correct
business processes and ser...
 
Tools4BPEL Tutorial
Tools4BPEL TutorialTools4BPEL Tutorial
Tools4BPEL Tutorial
 
Diagnosis of Open Workflow Nets
Diagnosis of Open Workflow NetsDiagnosis of Open Workflow Nets
Diagnosis of Open Workflow Nets
 
Analyzing Web Service Behavior
Analyzing Web Service BehaviorAnalyzing Web Service Behavior
Analyzing Web Service Behavior
 

Dernier

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Dernier (20)

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 

Verification with LoLA: 3 State Space Reduction

  • 1. 3. State Space Reduction
  • 2. Plan • Stubborn sets [Petri Nets 1999] • Symmetry [Acta Informatica 2000] • Invariants [TACAS 2003] • Sweep-Line [TACAS 2004]
  • 3. The Stubborn Set Method 3
  • 5. Diamonds from concurrency s1 a b s s’ b s2 a 4
  • 6. State Explosion by Concurrency Process A Process B Process C internal internal 1 internal internal internal 2 internal sync sync sync 3 4 111 211 121 112 311 221 131 212 122 113 312 321 231 222 132 213 123 322 331 232 313 133 223 332 323 233 333 444 5
  • 7. Stubborn Sets 111 211 121 112 311 221 131 212 122 113 312 321 231 222 132 213 123 322 331 232 313 133 223 332 323 233 333 6 444
  • 8. Stubborn Sets In every marking m: stubborn(m) ⊆ T fire only activated transitions in stubborn(m) 111 211 121 112 311 221 131 212 122 113 312 321 231 222 132 213 123 322 331 232 313 133 223 332 323 233 333 6 444
  • 9. Stubborn Sets In every marking m: stubborn(m) ⊆ T fire only activated transitions in stubborn(m) reduced transition system: 111 211 121 112 311 221 131 212 122 113 312 321 231 222 132 213 123 322 331 232 313 133 223 332 323 233 333 6 444
  • 10. Stubborn Sets In every marking m: stubborn(m) ⊆ T fire only activated transitions in stubborn(m) reduced transition system: 111 211 121 112 311 221 131 212 122 113 312 321 231 222 132 213 123 322 331 232 313 133 223 332 323 233 333 6 444
  • 11. Stubborn Sets In every marking m: stubborn(m) ⊆ T fire only activated transitions in stubborn(m) reduced transition system: 111 211 121 112 311 221 131 212 122 113 312 321 231 222 132 213 123 322 331 232 313 133 223 332 323 233 333 6 444
  • 12. Stubborn Sets In every marking m: stubborn(m) ⊆ T fire only activated transitions in stubborn(m) reduced transition system: 111 211 121 112 311 221 131 212 122 113 312 321 231 222 132 213 123 322 331 232 313 133 223 332 323 233 333 6 444
  • 13. Stubborn Sets In every marking m: stubborn(m) ⊆ T fire only activated transitions in stubborn(m) reduced transition system: 111 211 121 112 311 221 131 212 122 113 312 321 231 222 132 213 123 322 331 232 313 133 223 332 323 233 333 6 444
  • 14. Reduced Transition System 111 121 122 222 223 323 333 7 444
  • 15. How to Preserve Properties Core principle: outside stubborn(m) m2 implies in stubborn(m) plus property specific requirements presence of right path justifies absence of left path 8
  • 16. How to Preserve Properties Core principle: outside stubborn(m) m w1 m1 t m2 implies in stubborn(m) plus property specific requirements presence of right path justifies absence of left path 8
  • 17. How to Preserve Properties Core principle: outside stubborn(m) m w1 m1 t m2 implies m t m1 ’ w1 m2 in stubborn(m) plus property specific requirements presence of right path justifies absence of left path 8
  • 18. Preservation of Deadlocks Core principle + implies Proof: 9
  • 19. Preservation of Deadlocks Core principle + implies Proof: Let m w d length(w) = min 9
  • 20. Preservation of Deadlocks Core principle + implies Proof: Let m w d length(w) = min 1st case: some t of stubborn(m) occurs in w 9
  • 21. Preservation of Deadlocks Core principle + implies Proof: Let m w d length(w) = min 1st case: some t of stubborn(m) occurs in w m w1 s1 t m2 w2 d 9
  • 22. Preservation of Deadlocks Core principle + implies Proof: Let m w d length(w) = min 1st case: some t of stubborn(m) occurs in w m w1 s1 t m2 w2 d m t m1 ’ w1 m2 w2 d 9
  • 23. Preservation of Deadlocks Core principle + implies Proof: Let m w d length(w) = min 1st case: some t of stubborn(m) occurs in w m w1 s1 t m2 w2 d m1’ in red. TS, m t m1 ’ w1 m2 w2 d closer to d! 9
  • 24. Preservation of Deadlocks Core principle + implies Proof: Let m w d length(w) = min 1st case: some t of stubborn(m) occurs in w m w1 s1 t m2 w2 d m1’ in red. TS, m t m1 ’ w1 m2 w2 d closer to d! 2nd case: no t of stubborn(m) occurs in w 9
  • 25. Preservation of Deadlocks Core principle + implies Proof: Let m w d length(w) = min 1st case: some t of stubborn(m) occurs in w m w1 s1 t m2 w2 d m1’ in red. TS, m t m1 ’ w1 m2 w2 d closer to d! 2nd case: no t of stubborn(m) occurs in w m w d 9
  • 26. Preservation of Deadlocks Core principle + implies Proof: Let m w d length(w) = min 1st case: some t of stubborn(m) occurs in w m w1 s1 t m2 w2 d m1’ in red. TS, m t m1 ’ w1 m2 w2 d closer to d! 2nd case: no t of stubborn(m) occurs in w m w d t 9
  • 27. Preservation of Deadlocks Core principle + implies Proof: Let m w d length(w) = min 1st case: some t of stubborn(m) occurs in w m w1 s1 t m2 w2 d m1’ in red. TS, m t m1 ’ w1 m2 w2 d closer to d! 2nd case: no t of stubborn(m) occurs in w m w d t t 9
  • 28. Preservation of Deadlocks Core principle + implies Proof: Let m w d length(w) = min 1st case: some t of stubborn(m) occurs in w m w1 s1 t m2 w2 d m1’ in red. TS, m t m1 ’ w1 m2 w2 d closer to d! 2nd case: no t of stubborn(m) occurs in w m w d t d not a t 9 deadlock!
  • 29. Preservation of Deadlocks Core principle + m w m’ implies Proof: Let m w d length(w) = min 1st case: some t of stubborn(m) occurs in w m w1 s1 t m2 w2 d m1’ in red. TS, m t m1 ’ w1 m2 w2 d closer to d! 2nd case: no t of stubborn(m) occurs in w m w d t d not a t 9 deadlock!
  • 30. Preservation of Deadlocks Core principle + m w m’ implies t Proof: Let m w d length(w) = min 1st case: some t of stubborn(m) occurs in w m w1 s1 t m2 w2 d m1’ in red. TS, m t m1 ’ w1 m2 w2 d closer to d! 2nd case: no t of stubborn(m) occurs in w m w d t d not a t 9 deadlock!
  • 31. Preservation of Deadlocks Core principle + m w m’ implies t t Proof: Let m w d length(w) = min 1st case: some t of stubborn(m) occurs in w m w1 s1 t m2 w2 d m1’ in red. TS, m t m1 ’ w1 m2 w2 d closer to d! 2nd case: no t of stubborn(m) occurs in w m w d t d not a t 9 deadlock!
  • 32. Preservation of LTL/CTL LTLX: Core principle +Visibility: all transitions in stubborn(m) invisible to φ or stubborn(m) = T +Proviso: Once in every cycle: stubborn(m) = T CTLX: LTL + |stubborn(m)| = 1 or stubborn(m) = T Consequences: - only local properties yield reduction - Proviso avoids infinite stuttering - Proviso known to cause explosion - Proviso requires cycle detection (e.g. depth first) - CTL only performant when number of conflicts is small
  • 33. LoLA’s Approaches Let φ be state predicate Assume m does not satisfy φ wrup(m, φ ) = some set of transitions such that every path to an m’ that satisfies φ contains at least one transition of wrup(m, φ ). Examples: wrup(m, “m* reached”) = •p, for some p with m(p) < m*(p) = p•, for some p with m(p) > m*(p) wrup(m,p>k) = wrup(m,p≥k) = •p wrup(m,p<k) = wrup(m,p≤k) = p• wrup(m, φ1 ∧φ2) = wrup(m, φ1) if m does not satisfy φ1 = wrup(m, φ2) if m does not satisfy φ2 wrup(m, φ1 ∨φ2) = wrup(m, φ1)∪ wrup(m, φ2) wrup(m, t not dead) = {t} 11
  • 34. Theorem Reachability of φ: core principle + wrup(m, φ) ⊆ stubborn(m) orig. φ red. m m0 12
  • 35. Theorem Reachability of φ: core principle + wrup(m, φ) ⊆ stubborn(m) orig. φ red. m m0 12
  • 36. Theorem Reachability of φ: core principle + wrup(m, φ) ⊆ stubborn(m) orig. φ red. in wrup(m, φ) m m0 12
  • 37. Theorem Reachability of φ: core principle + wrup(m, φ) ⊆ stubborn(m) orig. φ red. in wrup(m, φ) t 1st in ample(m) m m0 12
  • 38. Theorem Reachability of φ: core principle + wrup(m, φ) ⊆ stubborn(m) orig. φ red. in wrup(m, φ) m1 t 1st in ample(m) m m0 12
  • 39. Theorem Reachability of φ: core principle + wrup(m, φ) ⊆ stubborn(m) orig. φ red. in wrup(m, φ) m1 t 1st in ample(m) m m1 closer to m’ than m m0 12
  • 40. Effect • Can be applied to global predicates • Astonishing goal-orientation • Has been relaxed by Kristensen/Valmari (wrup must be contained only once in an scc) • They perform better if predicate unreachable • Unrelaxed method better if predicate reachable • Can be extended to boundedness: • Bounded net: wrup(m) = {t : |t•|>|•t|} • Bounded place: wrup(m,p) = •p relaxed
  • 41. TSCC based properties Valmari: core principle + weak proviso: Every transition in stubborn(m) at least once in every tscc of reduced system: every tscc of original state space visited in reduced state space
  • 42. TSCC based properties Idea: - Construct Valmari’s tscc-preserving state space - Pick one element of each tscc of reduced state space - check mutual reachability for home state - check reachability of m0 for reversibility - check rechability of φ for liveness of φ userconfig.H: twophase TWOPHASE
  • 43. CTL/LTL properties • CTL: Separate search space for each subformula • Use wrup for EF and AG • Use traditional CTL method for other operators • LTL: search counterexample path: F φ ➪ G¬φ, GF φ ➪ FG¬φ, FGφ ➪ GF¬φ • G ¬φ LTL preserving, but drop Proviso • FG¬φ,GF¬φ: • drop Proviso if m satisfies ¬φ • wrup(m,¬φ) if m satisfies φ
  • 45. Symmetric Behavior Goal: symmetry in transition system σ is symmetry if: ΣTS: set of all σ is bijection R(m0)  R(m0) symmetries in R(m0) m [t> m’ iff ex. t’: σ(m) t’> σ(m’) σ(m0) = m0 by induction: m0 m1 m2 ... path  σ(m0) σ(m1) σ(m2) ... path as well -Id is always symmetry [ΣTS,o] is -If σ symmetry, so is σ-1 group -If σ1 and σ2 symmetries, so is σ1 o σ2 18
  • 47. Equivalence of States Have to detect symmetries prior to state space generation, typically cannot deduce all of them but: can always close under inversion and composition 19
  • 48. Equivalence of States Have to detect symmetries prior to state space generation, typically cannot deduce all of them but: can always close under inversion and composition fix some subgroup Σ ⊆ ΣTS 19
  • 49. Equivalence of States Have to detect symmetries prior to state space generation, typically cannot deduce all of them but: can always close under inversion and composition fix some subgroup Σ ⊆ ΣTS m ~ m’ iff ex. σ ∈ Σ such that σ(m) = m’ 19
  • 50. Equivalence of States Have to detect symmetries prior to state space generation, typically cannot deduce all of them but: can always close under inversion and composition fix some subgroup Σ ⊆ ΣTS m ~ m’ iff ex. σ ∈ Σ such that σ(m) = m’ ~ is equivalence relation 19
  • 51. Reduced Transition System TSΣ = [R(m0)/~ , EΣ , [m0]Σ] EΣ = { [ [s],[s’] ] | ex. s ∈ [s], ex. s’ ∈ [s’] : [s,s’] ∈ E} Size of reduced system: | R(m0)/~ | ≥ | R(m0) | / | Σ | |Σ | can be exponential in size of Petri net 20
  • 52. Σ = { Id, σ} Example σ([x,y,z]) = [y,x,z] (i,i,1) (r,i,1) (i,r,1) g1 (c,i,0) (r,r,1) (i,c,0) (c,r,0) (r,c,0) 21
  • 53. Example Σ = { Id, σ} σ([x,y,z]) = [y,x,z] (i,i,1) (r,i,1) (c,i,0) (r,r,1) (c,r,0) 22
  • 54. Construction of reduced R := E := ø; dfs(m0); dfs(m) Approximation R := R ∪ {m}; FOR ALL t: activated in m DO m’ = m + Δt; IF can find σ with σ(m’)∈ R THEN E := E ∪{[m, t, σ(m’) ]}; The “Orbit- ELSE Problem” E := E ∪{[m,t, m’ ]}; dfs(m’); END END 23
  • 55. “Traditional” Symmetry Tools • Depend on “scalar set” data type • =, ≠, arrays, for each, no constant • Cannot model networks other than cliques • LoLA: can handle all kinds of symmetry in the net structure
  • 56. PN automorphisms Bijection σ: P∪T → P∪T is PN automorphism, iff, for all x,y ∈ P∪T: - m0(x) = m0(σ(x)) - If [x,y] ∈ F then [σ(x),σ(y)] ∈ F and W([x,y]) = W([σ(x),σ(y)]) Every PN automorphism induces symmetry in state space: σ(m)(σ(p)) = m(p) 25
  • 57. Example 2 3 1 4 11 11 12 12 13 13 14 14 22 24 21 23 22 24 21 23 33 33 34 34 31 31 32 32 44 42 43 41 44 42 43 41 id 26
  • 58. Schreier-Sims generating set U1 U2 U3 subgroup induces partition of whole group pick one element of each class (“orbit”) Group: all automorphisms U1: all automorphisms that map p1 to p1 U2: all automorphisms that map p1 to p1, p2 to p2 ... Un: Id has O(n^2) elements
  • 59. Example 2 3 1 4 11 11 12 12 13 13 14 14 22 24 21 23 22 24 21 23 33 33 34 34 31 31 32 32 44 42 43 41 44 42 43 41 id U1 U2 28
  • 60. 2 3 Example 1 4 E={2 id, 3 2 ,3 2 3, 2 3 ; id, } 1 g1 4 1 g2 4 1 g3 4 1 g4 4 id o id = id g2 o id = id o g4 = g2 o g4 = g1 o id = g3 o id = g1 o g4 = g3 o g4 = 29
  • 61. Another Example 8 7 5 6 4 3 g = g1 o g2 o g3 1 2 1. Layer: 1 →1 ... 8 2. Layer 1 → 1, 2 → 2,4,5 3. Layer 1 → 1, 2 → 2, 3 → 3,6 7 + 2 + 1 = 10 generators for 8 x 3 x 2 = 48 automorphisms 30
  • 62. Orbit Problem: Approximation id id g11 g12 g13 g14-1 g21 g22 g23 g31 g32 g14 given: m searched: canonical representative(m) 31
  • 63. Orbit Problem: Approximation id id g11 g12 g13 g14-1 g21 g22 g23 g31 g32 g14 given: m searched: canonical representative(m) 1. m1 := MIN{g1i-1(m), i = ...} 31
  • 64. Orbit Problem: Approximation id id g11 g12 g13 g14-1 g21 g22 g23 g31 g32 g14 given: m searched: canonical representative(m) 1. m1 := MIN{g1i-1(m), i = ...} 2. m2 := MIN{g2i-1(m1), i = ...} 31
  • 65. Orbit Problem: Approximation id id g11 g12 g13 g14-1 g21 g22 g23 g31 g32 g14 given: m searched: canonical representative(m) 1. m1 := MIN{g1i-1(m), i = ...} 2. m2 := MIN{g2i-1(m1), i = ...} 3. m3 := MIN{g3i-1(m2), i = ...} 31
  • 66. Orbit Problem: Approximation id id g11 g12 g13 g14-1 g21 g22 g23 g31 g32 g14 given: m searched: canonical representative(m) 1. m1 := MIN{g1i-1(m), i = ...} ........ 2. m2 := MIN{g2i-1(m1), i = ...} n. mn := MIN{gni-1(mn-1), i = ...} 3. m3 := MIN{g3i-1(m2), i = ...} 31
  • 67. Orbit Problem: Approximation id id g11 g12 g13 g14-1 g21 g22 g23 g31 g32 g14 given: m searched: canonical representative(m) 1. m1 := MIN{g1i-1(m), i = ...} ........ 2. m2 := MIN{g2i-1(m1), i = ...} n. mn := MIN{gni-1(mn-1), i = ...} 3. m3 := MIN{g3i-1(m2), i = ...} canrep(m) := mn 31
  • 68. 2 3 Example 2 2 2 2 3 3 3 3 1 4 E={ , , ; } 1 4 1 4 1 4 1 4 g12 g13 g14 g22 3 2 2 3 m 32 32 id-1(m) = id(m) = 1 4 11 41 1 1 12 31 -1(m) = (m) = 31 42 32 31 -1(m) = (m) = 21 41 12 33 -1(m) = (m) = 11 4 2 32
  • 69. 2 3 Example 2 2 2 2 3 3 3 3 1 4 E={ , , ; } 1 4 1 4 1 4 1 4 g12 g13 g14 g22 3 2 2 3 m 32 32 id-1(m) = id(m) = 1 4 11 41 1 1 12 31 -1(m) = (m) = 31 42 32 31 -1(m) = (m) = 21 41 12 33 -1(m) = (m) = ≠ m1 11 4 2 32
  • 70. 2 3 2 Example 2 2 2 3 3 3 3 1 4 E={ , , ; } 1 4 1 4 1 4 1 4 g12 g13 g14 g22 3 2 2 3 s 12 33 id-1(m1) = id(m1) = 1 4 11 42 1 1 x = 12 3x = 3 22 33 s1 -1(m) = (m) = x=11 4x = 2 11 41 12 32 Result ≠ canrep(m) = (m) = 1 1 43
  • 71. 2 3 2 Example 2 2 2 3 3 3 3 1 4 E={ , , ; } 1 4 1 4 1 4 1 4 g12 g13 g14 g22 3 2 2 3 s 12 33 id-1(m1) = id(m1) = Result 1 4 11 42 1 1 x = 12 3x = 3 22 33 s1 -1(m) = (m) = x=11 4x = 2 11 41 12 32 Result ≠ canrep(m) = (m) = 1 1 43
  • 73. Summary Symmetries calculation of symmetries, exact solution of orbit problem: equivalent to graph isomorphism (NP) symmetries 34
  • 74. Summary Symmetries calculation of symmetries, exact solution of orbit problem: equivalent to graph isomorphism (NP) Many other orbit algorithms available in LoLA, even more by Tommi Junttila best choice depends on structure of symmetry group symmetries 34
  • 75. Using Petri net invariants in state space
  • 76. Two approaches compress states (use place invariants) save space and time exempt states from storage (use transition invariants) space/time tradeoff 36
  • 77. First approach: use place invariants 37
  • 78. First approach: use place invariants Let i be place invariant:. For all reachable m: i • m = i • m0 37
  • 79. First approach: use place invariants Let i be place invariant:. For all reachable m: i • m = i • m0 i • m0 – Σp’≠p i(p’) • m(p’) .... and, for a place p with i(p) ≠ 0: m(p) = i(p) 37
  • 80. Example 3 2 invariant 1: [ 1 1 0 0 0 ] invariant 2: [ 0 0 0 1 1 ] that is, for all reachable markings m: m(p1) = 1 – m(p2) m(p5) = 2 – m(p4) only p2,p3,p4 need to be stored (40 % compression) 38
  • 81. Overhead preprocessing - time - space state space construction - time 39
  • 82. Overhead appears to be: preprocessing - time compute invariants - space |inv| • |places| state space construction - time recover saved components 39
  • 83. Overhead appears to be: actually is: preprocessing - time compute invariants compute upper triangular form - space |inv| • |places| 1bit • |places| state space construction - time recover saved search, insert performed components on smaller vectors 39
  • 84. State space construction state yes/no state pointer depository (short vectors) state (recover removed components) 1 0 1 0 0 0 = 1 0 - -2 -1 = 3 1 2 1 1 40
  • 85. State space construction state yes/no state pointer depository (short vectors) state (recover removed components) 1 0 1 Observe: 0 0 0 = 1 0 - -2 -1 = 3 1 values of i irrelevant, 2 1 1 supp(i) sufficient! 40
  • 86. Upper triangular form 1 -1 0 0 1 0 0 0 . . -1 1 0 0 -1 0 0 0 0 1 0 3 -2 0 0 1 0 0 . . 0 0 -1 1 0 0 -1 0 . . 0 0 1 -1 0 0 1 0 1 0 incidence matrix triangular form invariants m(p2),m(p5) can be calculated from m(p1), m(p3), m(p4) 41
  • 87. Results 1. Space reduction 30% - 55% 2. Preprocessing time insignificant 3. Run time reduction proportional to space reduction Reason: search and insert operations take 80 – 95 % of overall run time ... are now performed on shorter vectors 4. combination with most other reduction techniques possible preduction 42
  • 89. Second approach: what happens if some states are removed from the depository? 43
  • 90. Second approach: what happens if some states are removed from the depository? 43
  • 91. Second approach: what happens if some states are removed from the depository? construction still terminates as long as removed states do not form cycles! 43
  • 92. Second approach: what happens if some states are removed from the depository? construction still terminates as long as removed states do not form cycles! use structural knowledge about cycles 43
  • 93. Transition invariants cycle in state space corresponds to transition invariant 44
  • 94. Transition invariants cycle in state space corresponds to transition invariant Assume: Set U of transitions s.t. for every transition invariant i: U ∩ supp(i) ≠∅ Then: store states that enable transitions in U do not store other states U can be determined from triangular form 44
  • 95. Example 3 2 transition invariant: [2,2,3,3]  U = {t} store only states where t is enabled 45
  • 96. Problems: 1. Too many states enable transitions in U Solution: combine with partial order reduction 2. Unacceptable run time overhead Solution 1: heuristically store additional states Solution 2: remove only non-branching states 46
  • 97. Ad 1: Full vs. Partial full state space 47
  • 98. Ad 1: Full vs. Partial stubborn set reduced state space 48
  • 99. Ad 2: store additional states k k 49
  • 100. Results 1. Controllable space/time trade-off 2. Combination with partial order reduction compulsory 3. Combination with a few other reduction techniques possible 4. Only simple properties can be verified (no access to graph structure of the state space) 50
  • 102. Road map The sweep-line method (basic/extended) Calculation of a progress measure Discussion - Combination with other reduction techniques
  • 103. The sweep-line method (Basic) Idea: state s → progress value p(s) with s [t> s‘ p(s) > p(s’) Unprocessed sweep-line
  • 104. The sweep-line method (Basic) Idea: state s → progress value p(s) with s [t> s‘ p(s) > p(s’) Unprocessed sweep-line p
  • 105. The sweep-line method (Basic) Idea: state s → progress value p(s) with s [t> s‘ p(s) > p(s’) Unprocessed Processed sweep-line p
  • 106. The sweep-line method (Basic) Idea: state s → progress value p(s) with s [t> s‘ p(s) > p(s’) Unprocessed Not yet seen Processed sweep-line p
  • 107. The sweep-line method (Basic) Idea: state s → progress value p(s) with s [t> s‘ p(s) > p(s’) Unprocessed  Not yet seen Processed sweep-line p
  • 108. The sweep-line method (extended) If p is not monotonous: t s’ s p(s’) < p(s)
  • 109. The sweep-line method (extended) If p is not monotonous: t s’ s p(s’) < p(s) -mark s’ “persistent” -start new sweep from s’
  • 110. The sweep-line method (extended) If p is not monotonous: t s’ s p(s’) < p(s) -mark s’ “persistent” -start new sweep from s’ Consequently: not too often p(s’) < p(s)
  • 111. Setting for LoLA’s measure -incremental: “transition offsets” Δ p(t) : m [t> m‘ p(m’) = p(m) + Δ p(t) -not necessarily monotonous (in every cycle: one negative Δ p or all Δ p = 0)
  • 112. The measure partition T into U and TU in U: all transitions linear independent in TU: all transitions linear dependent of U i.e. |U| = rank(C) -for t in U: Δ p (t) := 1 -for t in TU: Δ p(t) determined by (unique) lin. combination of U (for t in TU: Δ p(t) >0, =0, <0 ) typical size: |U| 60% - 100% of |T|
  • 113. U Examples TU 1 1 1 2 -2 1 1 1 0
  • 114. Geometric interpretation p2 s p3 p1 sweep
  • 115. Geometric interpretation p2 s p3 U p1 sweep
  • 116. Geometric interpretation p2 s p3 U p1 sweep
  • 117. Geometric interpretation progress p2 s p3 U p1 sweep
  • 118. Geometric interpretation progress p2 s p(s) p3 U p1 sweep
  • 119. Geometric interpretation progress p2 s p(s) p3 1 U p1 sweep

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. \n
  84. \n
  85. \n
  86. \n
  87. \n
  88. \n
  89. \n
  90. \n
  91. \n
  92. \n
  93. \n
  94. \n
  95. \n
  96. \n
  97. \n
  98. \n
  99. \n
  100. \n
  101. \n
  102. \n
  103. \n
  104. \n