SlideShare a Scribd company logo
Software Verification:
                  State-Event-based Reasoning
                     and Deadlock Detection


                                         Natasha Sharygina


                             Joint work with Sagar Chaki, Ed Clarke, Joel
                                              Ouaknine


USI-CMU summer school 2007                    Natasha Sharygina
Objectives
         C program verification
           Sequential and concurrent


         Properties involve both data (states) and
         communication (events)
           Specified as (State/Event) LTL formulas
           Safety and Liveness


         Communication via shared actions
           Synchronous communication
           Asynchronous execution


USI-CMU summer school 2007   Natasha Sharygina       2
Bluetooth L2CAP Spec


   “When an L2CAP_ConnectRsp event is received in a
   W4_L2CAP_CONNECT_RSP state, an L2CAP process
   may send out an L2CA_ConnectInd event, disable the RTX
   timer, and move to state CONFIG.”
                               …
              Spec involves both states and events




USI-CMU summer school 2007   Natasha Sharygina        3
Labelled Kripke Structures
        Directed graph with labels on edges and states,
        (S,Init,P,L,T,Σ,E)
              Every state is labeled with a set of atomic
              propositions, P, true in the state                               0,1
              Every LKS comes with
              an alphabet of actions, Σ                                   a          a
                                                              b     1,1                  1,0

                                                                          b          c
        State labeling function : L: S                        2P               0,0

        Transition labeling function : E : T                       (2Σ  {})
              Assumption: LKSs are deadlock-free
                 [see deadlock detection algorithm, later in this lecture]



USI-CMU summer school 2007                Natasha Sharygina                                    4
Traces and Languages


          Trace: infinite alternating sequence of
          states and actions
                 (s1 a s2 b s4 b s1…)
                                                                      s1


                                                                  a        a
                                                         b   s2                s3

          Language: set of all traces                             b        c
                 L(M) = {s1 a (s2 b + s3 c) s4 b}ω
                                                                      s4



                                                                      M
USI-CMU summer school 2007           Natasha Sharygina                         5
Surge Protector : State/Event

                                                    m2


                                              m1 c0 c1

                                   m1                              m2             m2
m0                                                                                 c0
c0          m=0                                   m=1                       m=2    c1
                                   m0                              m1             c2

                                                    m0


                      State/Event model of the Surge Protector
                              (example is given for m: [0..2], c: [0..2])
 USI-CMU summer school 2007                    Natasha Sharygina                  6
Surge Protector : State Only


                       m=0                          m=1                      m=2
                       c=0                          c=0                      c=0




                       m=0                          m=1                      m=2
                       c=1                          c=1                      c=1




                       m=0                          m=1                      m=2
                       c=2                          c=2                      c=2


                             Kripke structure of the Surge Protector
                               (example is given for m: [0..2], c: [0..2])
USI-CMU summer school 2007                      Natasha Sharygina                  7
State/Event LTL

Given LKS M = (S,Init,P,L,T,Σ,E), and p ∈ P, a                         ∈ Σ,
                       ϕ ::= p | a | ~ϕ | ϕ & ϕ | Xϕ | Gϕ | Fϕ | ϕ Uϕ

  π = (s1 a1 s2 a2 …) is a path and πi is the suffix of π starting at state si

  π╞ p iff s1 is the first state of π and p ∈ L(s1)
  π╞ a iff a is the first action of π
  π╞ ∼ϕ iff ∼(π╞ ϕ)
  π╞ Xϕ iff π2╞ ϕ
  π╞ ϕ1 U ϕ2 iff there is some i ≥ 1 such that πi╞ ϕ2
                  and for all 1 ≥ j ≥ i - 1, πj╞ ϕ1

                             M╞ ϕ iff, for every path π ∈ L(M), π╞ ϕ
USI-CMU summer school 2007                  Natasha Sharygina                 8
Surge Spec : State/Event

                                            m2


                                      m1 c0 c1

                               m1                          m2         m2
m0                                                                     c0
c0          m=0                           m=1                   m=2    c1
                               m0                          m1         c2

                                            m0


                        G ((c2 → m=2) & (c1 → (m=1 V m=2)))
 USI-CMU summer school 2007            Natasha Sharygina              9
Surge Spec : State Only


                       m=0                    m=1                 m=2
                       c=0                    c=0                 c=0




                       m=0                    m=1                 m=2
                       c=1                    c=1                 c=1




                       m=0                    m=1                 m=2
                       c=2                    c=2                 c=2


                        G (((c=0 V c=2) & X (c=1)) → (m=1 V m=2)) &
                              G (((c=0 V c=1) & X (c=2)) → m=2)
USI-CMU summer school 2007                Natasha Sharygina             10
Surge Protector Verification


• Changes of current beyond threshold are disallowed

• State/Event Formula: G ((c2 → m=2) & (c1 → (m=1 V m=2)))

• State Formula: G (((c=0 V c=2) & X (c=1)) → (m=1 V m=2))
               & G (((c=0 V c=1) & X (c=2)) → m=2)

• Event Formula: G (m0 → ((∼c1 W (m1 V m2) ) ) &
                 G (m0 → ((∼c2 W m2)) &
                 G (m1 → ((∼c2 W m2))




USI-CMU summer school 2007   Natasha Sharygina               11
Automata-based Verification
 Given:                       M – LKS over Σ, P
                              ϕ – SE/LTL formula
 How to check:               M╞ ϕ

 Possible Approach:
 1. Convert M into a conventional state-only Kripke structure
 2. Convert ϕ into a state-only LTL formula
 3. Check whether M╞ ϕ
 Inefficient!
 What we do:
 1. Interpret ϕ as an LTL formula over Σ U P
 2. Compute B~ϕ (using Wring [Somenzi, Bloem’00])
 3. Construct M ⊗ B~ϕ (result is a Buchi automaton)
 4. Theorem: We have L (M ⊗ B~ϕ ) = {} iff M╞ ϕ
 No extra cost in time or space!
USI-CMU summer school 2007          Natasha Sharygina           12
Verification Results
   Current                   State Formula                          Event Formula                     State/Event Formula
    range
                    Aut. Size                Time       Aut. Size                Time           Aut. Size               Time


                   St        Tr       BC        MC      St     Tr         BC            MC      St     Tr       BC             MC

                    4         5       0.25      0.383   6      10        0.245          0.32    3       4       0.184          0.252
     2
                   14        23       0.49      1.141   20     41        1.597          1.77    5       8       0.243          0.391
     4
                   32        57       2.43      4.818   42     92        12.08          12.66   7      12       0.614          0.962
     6
                   58        107      17.5      24.60   72     163       372.8      374.17      9      16       2.622          3.133
     8
                   92        173       196      214.0   X       X            X           X      11     20       33.56          34.5
    10
                    X         X         X           X   X       X            X           X      13     24       534.9          536.4
    12
                    X         X         X           X   X       X            X           X      X       X        X              X
    13


USI-CMU summer school 2007                               Natasha Sharygina                                                       13
Concurrent Software
   Components synchronize on shared actions
          proceed independently on local actions


   Propositions of components are disjoint (no shared
   variables)




USI-CMU summer school 2007     Natasha Sharygina        14
Operational Semantics


                             a                 a
               M1 → M1’               M 2 → M2 ’            Synchronization on
                                 a                            Shared action
             (M1 || M2) → (M1’ || M2’)

                 a
               M1→ M1’               a ∉ Σ (M2)               Asynchronous
                        a                                       Execution
             (M1 || M2) → (M1’ || M2)

USI-CMU summer school 2007              Natasha Sharygina                    15
Operational Semantics
State of M1 || M2 is of the form (s1,s2) where si is a state of Mi




                a                                                         a
         s1             s’1       a ∉ Σ( M2)                     s2           s’2   a ∉ Σ( M1)
                              a                                                     a
               (s1,s2)                 (s’1,s2)                       (s1,s2)           (s1,s’2)

                                       a                              a
                                  s1       s’1             s2                 s’2
                                                  a
                                       (s1,s2)           (s’1,s’2)

       State-space exponential in # of components
USI-CMU summer school 2007                        Natasha Sharygina                                16
Example

                                               d                                                           d

               a               b        c                                    a          b’            c
       1                 2          3          4                       1’          2’        3’           4’

           M1 Σ = {a,b,c,d}                                             M2 Σ = {a,b’,c,d}
                                                                                                  d
                                            b              3,2’             b’
                                    a                                                   c
                             1,1’       2,2’                                     3,3’        4,4’
                                               b’          2,3’             b

                                                    M1 k M2
USI-CMU summer school 2007                         Natasha Sharygina                                       17
Compositional Verification

                               ☺
C Program                   Predicate                  Model                   SE-LTL       Yes
Abstraction                Abstraction                                       Verification
                                                                                            System OK
 Guidance                                     Counter                       No
                                              Example
                                Improved      Guided                             Counterexample
                               Abstraction
                                Guidance
                                              Abstraction
                                              Refinement
                                  ☺                                                ☺
                          Abstraction                                No   Counterexample    Yes
                          Refinement                                          Valid?
                                                Spurious
                                             Counterexample

  USI-CMU summer school 2007                     Natasha Sharygina                                18
Case Studies
   MicroC/OS-II
     Real-time OS for embedded applications
     Widely used (cell phones, medical devices,
     routers, washing machines…)
     6000+ LOC
     Verified locking discipline
                 Locks and Unlocks alternate and locks are eventually
                 released
          Found four bugs
                 Missing unlock and return (three known – one unknown)




USI-CMU summer school 2007            Natasha Sharygina                  19
Results

   Name              St-B    Tr-B   St-Mdl       T-BA            T-Mdl   T-Ver   T-Tot   Mem

      SS               25    47     7951         0.690           48.8    6.84    56.9    39.3

      SE               20    45     4331         0.497           18.8    2.92    22.8    24.2

      SS               25    47     7574         0.699           43.6    1.65    46.4    38.1

      SE               18    40     3691         0.407           15.3    1.089   17.3    21.2

      SS               25    47     24.8 M       0.874           65.6     X       X      851

      SE               20    45     13.6M        0.655           33.1    2.17    2207    162

      SS               25    47     32.6M        0.836           66.0     X       X      347

      SE               18    40     15.9M        0.713           34.6    4149    4185    321

    BUG                 8    14      873         0.205           3.41    0.261   3.88     X



USI-CMU summer school 2007                   Natasha Sharygina                                20
Case Studies
   IPC Module
      Deployed by a world leader in robotics engineering systems
      1500+ LOC
      4 components
      Over 30 billion states after predicate abstraction


   Discovered synchronization bug in a matter of hours
      Process can incorrectly block while writing to a queue
      Undetected despite seven years of testing/industrial use




USI-CMU summer school 2007    Natasha Sharygina                    21
Summary of the Approach
   State/Event-based modeling and specification


   Efficient (direct) model checking algorithm


   CEGAR loop for software systems
     Safety and liveness properties


   Compositional software verification
     Component-wise abstractions
     Component-wise counterexample validation
     Component-wise refinements




USI-CMU summer school 2007     Natasha Sharygina   22
References
    Sagar Chaki, Edmund M. Clarke, Joël Ouaknine,
    Natasha Sharygina: Concurrent software verification
    with states, events, and deadlocks. Formal Aspects
    of Computing 17(4): 461-483 (2005)


    Chiara Braghin, Natasha Sharygina, Katerina Barone-
    Adesi: Automated Verification of Security Policies in
    Mobile Code, In Proc. of Integrated Formal Methods
    2007 conf., LNCS 4591:37 - 54 (2007)




USI-CMU summer school 2007   Natasha Sharygina          23

More Related Content

What's hot

Mean variance
Mean varianceMean variance
Mean variance
odkoo
 
CMA-ES with local meta-models
CMA-ES with local meta-modelsCMA-ES with local meta-models
CMA-ES with local meta-models
zyedb
 
626 pages
626 pages626 pages
626 pages
JFG407
 
SSA slides
SSA slidesSSA slides
SSA slides
atikrkhan
 
Tutorial solutions 2010
Tutorial solutions 2010Tutorial solutions 2010
Tutorial solutions 2010
Sufi Sulaiman
 
4831603 physics-formula-list-form-4
4831603 physics-formula-list-form-44831603 physics-formula-list-form-4
4831603 physics-formula-list-form-4
hongtee82
 
F. Quevedo, On Local String Models and Moduli Stabilisation
F. Quevedo, On Local String Models and Moduli StabilisationF. Quevedo, On Local String Models and Moduli Stabilisation
F. Quevedo, On Local String Models and Moduli Stabilisation
SEENET-MTP
 
Hidden Markov Models
Hidden Markov ModelsHidden Markov Models
Hidden Markov Models
guestfee8698
 
Physics formula list
Physics formula listPhysics formula list
Physics formula list
JSlinkyNY
 
Analisi numerica di problemi di ingegneria strutturale
Analisi numerica di problemi di ingegneria strutturaleAnalisi numerica di problemi di ingegneria strutturale
Analisi numerica di problemi di ingegneria strutturale
MMSLAB
 
Peer instructions questions for basic quantum mechanics
Peer instructions questions for basic quantum mechanicsPeer instructions questions for basic quantum mechanics
Peer instructions questions for basic quantum mechanics
molmodbasics
 
Iskmaa
IskmaaIskmaa
Iskmaa
gustavdelius
 
Hw6sols
Hw6solsHw6sols
Hw6sols
physics8899
 
ANISOTROPIC SURFACES DETECTION USING INTENSITY MAPS ACQUIRED BY AN AIRBORNE L...
ANISOTROPIC SURFACES DETECTION USING INTENSITY MAPS ACQUIRED BY AN AIRBORNE L...ANISOTROPIC SURFACES DETECTION USING INTENSITY MAPS ACQUIRED BY AN AIRBORNE L...
ANISOTROPIC SURFACES DETECTION USING INTENSITY MAPS ACQUIRED BY AN AIRBORNE L...
grssieee
 
L 32(nkd)(et) ((ee)nptel)
L 32(nkd)(et) ((ee)nptel)L 32(nkd)(et) ((ee)nptel)
L 32(nkd)(et) ((ee)nptel)
sairoopareddy
 
Introduction to (weak) wave turbulence
Introduction to (weak) wave turbulenceIntroduction to (weak) wave turbulence
Introduction to (weak) wave turbulence
Colm Connaughton
 
Simulation of Magnetically Confined Plasma for Etch Applications
Simulation of Magnetically Confined Plasma for Etch ApplicationsSimulation of Magnetically Confined Plasma for Etch Applications
Simulation of Magnetically Confined Plasma for Etch Applications
vvk0
 
Tele4653 l8
Tele4653 l8Tele4653 l8
Tele4653 l8
Vin Voro
 
Polarons in bulk and near surfaces
Polarons in bulk and near surfacesPolarons in bulk and near surfaces
Polarons in bulk and near surfaces
nirupam12
 

What's hot (19)

Mean variance
Mean varianceMean variance
Mean variance
 
CMA-ES with local meta-models
CMA-ES with local meta-modelsCMA-ES with local meta-models
CMA-ES with local meta-models
 
626 pages
626 pages626 pages
626 pages
 
SSA slides
SSA slidesSSA slides
SSA slides
 
Tutorial solutions 2010
Tutorial solutions 2010Tutorial solutions 2010
Tutorial solutions 2010
 
4831603 physics-formula-list-form-4
4831603 physics-formula-list-form-44831603 physics-formula-list-form-4
4831603 physics-formula-list-form-4
 
F. Quevedo, On Local String Models and Moduli Stabilisation
F. Quevedo, On Local String Models and Moduli StabilisationF. Quevedo, On Local String Models and Moduli Stabilisation
F. Quevedo, On Local String Models and Moduli Stabilisation
 
Hidden Markov Models
Hidden Markov ModelsHidden Markov Models
Hidden Markov Models
 
Physics formula list
Physics formula listPhysics formula list
Physics formula list
 
Analisi numerica di problemi di ingegneria strutturale
Analisi numerica di problemi di ingegneria strutturaleAnalisi numerica di problemi di ingegneria strutturale
Analisi numerica di problemi di ingegneria strutturale
 
Peer instructions questions for basic quantum mechanics
Peer instructions questions for basic quantum mechanicsPeer instructions questions for basic quantum mechanics
Peer instructions questions for basic quantum mechanics
 
Iskmaa
IskmaaIskmaa
Iskmaa
 
Hw6sols
Hw6solsHw6sols
Hw6sols
 
ANISOTROPIC SURFACES DETECTION USING INTENSITY MAPS ACQUIRED BY AN AIRBORNE L...
ANISOTROPIC SURFACES DETECTION USING INTENSITY MAPS ACQUIRED BY AN AIRBORNE L...ANISOTROPIC SURFACES DETECTION USING INTENSITY MAPS ACQUIRED BY AN AIRBORNE L...
ANISOTROPIC SURFACES DETECTION USING INTENSITY MAPS ACQUIRED BY AN AIRBORNE L...
 
L 32(nkd)(et) ((ee)nptel)
L 32(nkd)(et) ((ee)nptel)L 32(nkd)(et) ((ee)nptel)
L 32(nkd)(et) ((ee)nptel)
 
Introduction to (weak) wave turbulence
Introduction to (weak) wave turbulenceIntroduction to (weak) wave turbulence
Introduction to (weak) wave turbulence
 
Simulation of Magnetically Confined Plasma for Etch Applications
Simulation of Magnetically Confined Plasma for Etch ApplicationsSimulation of Magnetically Confined Plasma for Etch Applications
Simulation of Magnetically Confined Plasma for Etch Applications
 
Tele4653 l8
Tele4653 l8Tele4653 l8
Tele4653 l8
 
Polarons in bulk and near surfaces
Polarons in bulk and near surfacesPolarons in bulk and near surfaces
Polarons in bulk and near surfaces
 

Similar to 20080501 software verification_sharygina_lecture02

What happens when the Kolmogorov-Zakharov spectrum is nonlocal?
What happens when the Kolmogorov-Zakharov spectrum is nonlocal?What happens when the Kolmogorov-Zakharov spectrum is nonlocal?
What happens when the Kolmogorov-Zakharov spectrum is nonlocal?
Colm Connaughton
 
Fluctuations and rare events in stochastic aggregation
Fluctuations and rare events in stochastic aggregationFluctuations and rare events in stochastic aggregation
Fluctuations and rare events in stochastic aggregation
Colm Connaughton
 
Pres110811
Pres110811Pres110811
Pres110811
shotlub
 
Slides SAS'2002
Slides SAS'2002Slides SAS'2002
Slides SAS'2002
Maria Del Mar Gallardo
 
A study of the worst case ratio of a simple algorithm for simple assembly lin...
A study of the worst case ratio of a simple algorithm for simple assembly lin...A study of the worst case ratio of a simple algorithm for simple assembly lin...
A study of the worst case ratio of a simple algorithm for simple assembly lin...
narmo
 
Nanomagnetism, Javier Tejada
Nanomagnetism, Javier TejadaNanomagnetism, Javier Tejada
Nanomagnetism, Javier Tejada
oriolespinal
 
論文紹介:Towards Robust Adaptive Object Detection Under Noisy Annotations
論文紹介:Towards Robust Adaptive Object Detection Under Noisy Annotations論文紹介:Towards Robust Adaptive Object Detection Under Noisy Annotations
論文紹介:Towards Robust Adaptive Object Detection Under Noisy Annotations
Toru Tamaki
 
Jere Koskela slides
Jere Koskela slidesJere Koskela slides
Jere Koskela slides
Christian Robert
 
Testing the Stability of GPS Oscillators within Serbian Permanent GPS Station...
Testing the Stability of GPS Oscillators within Serbian Permanent GPS Station...Testing the Stability of GPS Oscillators within Serbian Permanent GPS Station...
Testing the Stability of GPS Oscillators within Serbian Permanent GPS Station...
vogrizovic
 
Cluster aggregation with complete collisional fragmentation
Cluster aggregation with complete collisional fragmentationCluster aggregation with complete collisional fragmentation
Cluster aggregation with complete collisional fragmentation
Colm Connaughton
 
G. Martinelli - From the Standard Model to Dark Matter and beyond: Symmetries...
G. Martinelli - From the Standard Model to Dark Matter and beyond: Symmetries...G. Martinelli - From the Standard Model to Dark Matter and beyond: Symmetries...
G. Martinelli - From the Standard Model to Dark Matter and beyond: Symmetries...
SEENET-MTP
 
Iit jam 2016 physics solutions BY Trajectoryeducation
Iit jam 2016 physics solutions BY TrajectoryeducationIit jam 2016 physics solutions BY Trajectoryeducation
Iit jam 2016 physics solutions BY Trajectoryeducation
Dev Singh
 
Cluster-cluster aggregation with (complete) collisional fragmentation
Cluster-cluster aggregation with (complete) collisional fragmentationCluster-cluster aggregation with (complete) collisional fragmentation
Cluster-cluster aggregation with (complete) collisional fragmentation
Colm Connaughton
 
Prévision de consommation électrique avec adaptive GAM
Prévision de consommation électrique avec adaptive GAMPrévision de consommation électrique avec adaptive GAM
Prévision de consommation électrique avec adaptive GAM
Cdiscount
 
Parametric time domain system identification of a mass spring-damper
Parametric time domain system identification of a mass spring-damperParametric time domain system identification of a mass spring-damper
Parametric time domain system identification of a mass spring-damper
MidoOoz
 
Mit2 092 f09_lec06
Mit2 092 f09_lec06Mit2 092 f09_lec06
Mit2 092 f09_lec06
Rahman Hakim
 
Tutorial no. 2
Tutorial no. 2Tutorial no. 2
Tutorial no. 2
Shankar Gangaju
 
Shailaja
ShailajaShailaja
Shailaja
ShailajaMca
 
Lecture6 svdd
Lecture6 svddLecture6 svdd
Lecture6 svdd
Stéphane Canu
 
Quickselect Under Yaroslavskiy's Dual Pivoting Algorithm
Quickselect Under Yaroslavskiy's Dual Pivoting AlgorithmQuickselect Under Yaroslavskiy's Dual Pivoting Algorithm
Quickselect Under Yaroslavskiy's Dual Pivoting Algorithm
Sebastian Wild
 

Similar to 20080501 software verification_sharygina_lecture02 (20)

What happens when the Kolmogorov-Zakharov spectrum is nonlocal?
What happens when the Kolmogorov-Zakharov spectrum is nonlocal?What happens when the Kolmogorov-Zakharov spectrum is nonlocal?
What happens when the Kolmogorov-Zakharov spectrum is nonlocal?
 
Fluctuations and rare events in stochastic aggregation
Fluctuations and rare events in stochastic aggregationFluctuations and rare events in stochastic aggregation
Fluctuations and rare events in stochastic aggregation
 
Pres110811
Pres110811Pres110811
Pres110811
 
Slides SAS'2002
Slides SAS'2002Slides SAS'2002
Slides SAS'2002
 
A study of the worst case ratio of a simple algorithm for simple assembly lin...
A study of the worst case ratio of a simple algorithm for simple assembly lin...A study of the worst case ratio of a simple algorithm for simple assembly lin...
A study of the worst case ratio of a simple algorithm for simple assembly lin...
 
Nanomagnetism, Javier Tejada
Nanomagnetism, Javier TejadaNanomagnetism, Javier Tejada
Nanomagnetism, Javier Tejada
 
論文紹介:Towards Robust Adaptive Object Detection Under Noisy Annotations
論文紹介:Towards Robust Adaptive Object Detection Under Noisy Annotations論文紹介:Towards Robust Adaptive Object Detection Under Noisy Annotations
論文紹介:Towards Robust Adaptive Object Detection Under Noisy Annotations
 
Jere Koskela slides
Jere Koskela slidesJere Koskela slides
Jere Koskela slides
 
Testing the Stability of GPS Oscillators within Serbian Permanent GPS Station...
Testing the Stability of GPS Oscillators within Serbian Permanent GPS Station...Testing the Stability of GPS Oscillators within Serbian Permanent GPS Station...
Testing the Stability of GPS Oscillators within Serbian Permanent GPS Station...
 
Cluster aggregation with complete collisional fragmentation
Cluster aggregation with complete collisional fragmentationCluster aggregation with complete collisional fragmentation
Cluster aggregation with complete collisional fragmentation
 
G. Martinelli - From the Standard Model to Dark Matter and beyond: Symmetries...
G. Martinelli - From the Standard Model to Dark Matter and beyond: Symmetries...G. Martinelli - From the Standard Model to Dark Matter and beyond: Symmetries...
G. Martinelli - From the Standard Model to Dark Matter and beyond: Symmetries...
 
Iit jam 2016 physics solutions BY Trajectoryeducation
Iit jam 2016 physics solutions BY TrajectoryeducationIit jam 2016 physics solutions BY Trajectoryeducation
Iit jam 2016 physics solutions BY Trajectoryeducation
 
Cluster-cluster aggregation with (complete) collisional fragmentation
Cluster-cluster aggregation with (complete) collisional fragmentationCluster-cluster aggregation with (complete) collisional fragmentation
Cluster-cluster aggregation with (complete) collisional fragmentation
 
Prévision de consommation électrique avec adaptive GAM
Prévision de consommation électrique avec adaptive GAMPrévision de consommation électrique avec adaptive GAM
Prévision de consommation électrique avec adaptive GAM
 
Parametric time domain system identification of a mass spring-damper
Parametric time domain system identification of a mass spring-damperParametric time domain system identification of a mass spring-damper
Parametric time domain system identification of a mass spring-damper
 
Mit2 092 f09_lec06
Mit2 092 f09_lec06Mit2 092 f09_lec06
Mit2 092 f09_lec06
 
Tutorial no. 2
Tutorial no. 2Tutorial no. 2
Tutorial no. 2
 
Shailaja
ShailajaShailaja
Shailaja
 
Lecture6 svdd
Lecture6 svddLecture6 svdd
Lecture6 svdd
 
Quickselect Under Yaroslavskiy's Dual Pivoting Algorithm
Quickselect Under Yaroslavskiy's Dual Pivoting AlgorithmQuickselect Under Yaroslavskiy's Dual Pivoting Algorithm
Quickselect Under Yaroslavskiy's Dual Pivoting Algorithm
 

More from Computer Science Club

20141223 kuznetsov distributed
20141223 kuznetsov distributed20141223 kuznetsov distributed
20141223 kuznetsov distributed
Computer Science Club
 
Computer Vision
Computer VisionComputer Vision
Computer Vision
Computer Science Club
 
20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs
Computer Science Club
 
20140531 serebryany lecture02_find_scary_cpp_bugs
20140531 serebryany lecture02_find_scary_cpp_bugs20140531 serebryany lecture02_find_scary_cpp_bugs
20140531 serebryany lecture02_find_scary_cpp_bugs
Computer Science Club
 
20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs
Computer Science Club
 
20140511 parallel programming_kalishenko_lecture12
20140511 parallel programming_kalishenko_lecture1220140511 parallel programming_kalishenko_lecture12
20140511 parallel programming_kalishenko_lecture12Computer Science Club
 
20140427 parallel programming_zlobin_lecture11
20140427 parallel programming_zlobin_lecture1120140427 parallel programming_zlobin_lecture11
20140427 parallel programming_zlobin_lecture11
Computer Science Club
 
20140420 parallel programming_kalishenko_lecture10
20140420 parallel programming_kalishenko_lecture1020140420 parallel programming_kalishenko_lecture10
20140420 parallel programming_kalishenko_lecture10Computer Science Club
 
20140413 parallel programming_kalishenko_lecture09
20140413 parallel programming_kalishenko_lecture0920140413 parallel programming_kalishenko_lecture09
20140413 parallel programming_kalishenko_lecture09Computer Science Club
 
20140329 graph drawing_dainiak_lecture02
20140329 graph drawing_dainiak_lecture0220140329 graph drawing_dainiak_lecture02
20140329 graph drawing_dainiak_lecture02Computer Science Club
 
20140329 graph drawing_dainiak_lecture01
20140329 graph drawing_dainiak_lecture0120140329 graph drawing_dainiak_lecture01
20140329 graph drawing_dainiak_lecture01Computer Science Club
 
20140310 parallel programming_kalishenko_lecture03-04
20140310 parallel programming_kalishenko_lecture03-0420140310 parallel programming_kalishenko_lecture03-04
20140310 parallel programming_kalishenko_lecture03-04Computer Science Club
 
20140216 parallel programming_kalishenko_lecture01
20140216 parallel programming_kalishenko_lecture0120140216 parallel programming_kalishenko_lecture01
20140216 parallel programming_kalishenko_lecture01Computer Science Club
 

More from Computer Science Club (20)

20141223 kuznetsov distributed
20141223 kuznetsov distributed20141223 kuznetsov distributed
20141223 kuznetsov distributed
 
Computer Vision
Computer VisionComputer Vision
Computer Vision
 
20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs
 
20140531 serebryany lecture02_find_scary_cpp_bugs
20140531 serebryany lecture02_find_scary_cpp_bugs20140531 serebryany lecture02_find_scary_cpp_bugs
20140531 serebryany lecture02_find_scary_cpp_bugs
 
20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs
 
20140511 parallel programming_kalishenko_lecture12
20140511 parallel programming_kalishenko_lecture1220140511 parallel programming_kalishenko_lecture12
20140511 parallel programming_kalishenko_lecture12
 
20140427 parallel programming_zlobin_lecture11
20140427 parallel programming_zlobin_lecture1120140427 parallel programming_zlobin_lecture11
20140427 parallel programming_zlobin_lecture11
 
20140420 parallel programming_kalishenko_lecture10
20140420 parallel programming_kalishenko_lecture1020140420 parallel programming_kalishenko_lecture10
20140420 parallel programming_kalishenko_lecture10
 
20140413 parallel programming_kalishenko_lecture09
20140413 parallel programming_kalishenko_lecture0920140413 parallel programming_kalishenko_lecture09
20140413 parallel programming_kalishenko_lecture09
 
20140329 graph drawing_dainiak_lecture02
20140329 graph drawing_dainiak_lecture0220140329 graph drawing_dainiak_lecture02
20140329 graph drawing_dainiak_lecture02
 
20140329 graph drawing_dainiak_lecture01
20140329 graph drawing_dainiak_lecture0120140329 graph drawing_dainiak_lecture01
20140329 graph drawing_dainiak_lecture01
 
20140310 parallel programming_kalishenko_lecture03-04
20140310 parallel programming_kalishenko_lecture03-0420140310 parallel programming_kalishenko_lecture03-04
20140310 parallel programming_kalishenko_lecture03-04
 
20140223-SuffixTrees-lecture01-03
20140223-SuffixTrees-lecture01-0320140223-SuffixTrees-lecture01-03
20140223-SuffixTrees-lecture01-03
 
20140216 parallel programming_kalishenko_lecture01
20140216 parallel programming_kalishenko_lecture0120140216 parallel programming_kalishenko_lecture01
20140216 parallel programming_kalishenko_lecture01
 
20131106 h10 lecture6_matiyasevich
20131106 h10 lecture6_matiyasevich20131106 h10 lecture6_matiyasevich
20131106 h10 lecture6_matiyasevich
 
20131027 h10 lecture5_matiyasevich
20131027 h10 lecture5_matiyasevich20131027 h10 lecture5_matiyasevich
20131027 h10 lecture5_matiyasevich
 
20131027 h10 lecture5_matiyasevich
20131027 h10 lecture5_matiyasevich20131027 h10 lecture5_matiyasevich
20131027 h10 lecture5_matiyasevich
 
20131013 h10 lecture4_matiyasevich
20131013 h10 lecture4_matiyasevich20131013 h10 lecture4_matiyasevich
20131013 h10 lecture4_matiyasevich
 
20131006 h10 lecture3_matiyasevich
20131006 h10 lecture3_matiyasevich20131006 h10 lecture3_matiyasevich
20131006 h10 lecture3_matiyasevich
 
20131006 h10 lecture3_matiyasevich
20131006 h10 lecture3_matiyasevich20131006 h10 lecture3_matiyasevich
20131006 h10 lecture3_matiyasevich
 

Recently uploaded

Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Precisely
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 

Recently uploaded (20)

Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 

20080501 software verification_sharygina_lecture02

  • 1. Software Verification: State-Event-based Reasoning and Deadlock Detection Natasha Sharygina Joint work with Sagar Chaki, Ed Clarke, Joel Ouaknine USI-CMU summer school 2007 Natasha Sharygina
  • 2. Objectives C program verification Sequential and concurrent Properties involve both data (states) and communication (events) Specified as (State/Event) LTL formulas Safety and Liveness Communication via shared actions Synchronous communication Asynchronous execution USI-CMU summer school 2007 Natasha Sharygina 2
  • 3. Bluetooth L2CAP Spec “When an L2CAP_ConnectRsp event is received in a W4_L2CAP_CONNECT_RSP state, an L2CAP process may send out an L2CA_ConnectInd event, disable the RTX timer, and move to state CONFIG.” … Spec involves both states and events USI-CMU summer school 2007 Natasha Sharygina 3
  • 4. Labelled Kripke Structures Directed graph with labels on edges and states, (S,Init,P,L,T,Σ,E) Every state is labeled with a set of atomic propositions, P, true in the state 0,1 Every LKS comes with an alphabet of actions, Σ a a b 1,1 1,0 b c State labeling function : L: S 2P 0,0 Transition labeling function : E : T (2Σ {}) Assumption: LKSs are deadlock-free [see deadlock detection algorithm, later in this lecture] USI-CMU summer school 2007 Natasha Sharygina 4
  • 5. Traces and Languages Trace: infinite alternating sequence of states and actions (s1 a s2 b s4 b s1…) s1 a a b s2 s3 Language: set of all traces b c L(M) = {s1 a (s2 b + s3 c) s4 b}ω s4 M USI-CMU summer school 2007 Natasha Sharygina 5
  • 6. Surge Protector : State/Event m2 m1 c0 c1 m1 m2 m2 m0 c0 c0 m=0 m=1 m=2 c1 m0 m1 c2 m0 State/Event model of the Surge Protector (example is given for m: [0..2], c: [0..2]) USI-CMU summer school 2007 Natasha Sharygina 6
  • 7. Surge Protector : State Only m=0 m=1 m=2 c=0 c=0 c=0 m=0 m=1 m=2 c=1 c=1 c=1 m=0 m=1 m=2 c=2 c=2 c=2 Kripke structure of the Surge Protector (example is given for m: [0..2], c: [0..2]) USI-CMU summer school 2007 Natasha Sharygina 7
  • 8. State/Event LTL Given LKS M = (S,Init,P,L,T,Σ,E), and p ∈ P, a ∈ Σ, ϕ ::= p | a | ~ϕ | ϕ & ϕ | Xϕ | Gϕ | Fϕ | ϕ Uϕ π = (s1 a1 s2 a2 …) is a path and πi is the suffix of π starting at state si π╞ p iff s1 is the first state of π and p ∈ L(s1) π╞ a iff a is the first action of π π╞ ∼ϕ iff ∼(π╞ ϕ) π╞ Xϕ iff π2╞ ϕ π╞ ϕ1 U ϕ2 iff there is some i ≥ 1 such that πi╞ ϕ2 and for all 1 ≥ j ≥ i - 1, πj╞ ϕ1 M╞ ϕ iff, for every path π ∈ L(M), π╞ ϕ USI-CMU summer school 2007 Natasha Sharygina 8
  • 9. Surge Spec : State/Event m2 m1 c0 c1 m1 m2 m2 m0 c0 c0 m=0 m=1 m=2 c1 m0 m1 c2 m0 G ((c2 → m=2) & (c1 → (m=1 V m=2))) USI-CMU summer school 2007 Natasha Sharygina 9
  • 10. Surge Spec : State Only m=0 m=1 m=2 c=0 c=0 c=0 m=0 m=1 m=2 c=1 c=1 c=1 m=0 m=1 m=2 c=2 c=2 c=2 G (((c=0 V c=2) & X (c=1)) → (m=1 V m=2)) & G (((c=0 V c=1) & X (c=2)) → m=2) USI-CMU summer school 2007 Natasha Sharygina 10
  • 11. Surge Protector Verification • Changes of current beyond threshold are disallowed • State/Event Formula: G ((c2 → m=2) & (c1 → (m=1 V m=2))) • State Formula: G (((c=0 V c=2) & X (c=1)) → (m=1 V m=2)) & G (((c=0 V c=1) & X (c=2)) → m=2) • Event Formula: G (m0 → ((∼c1 W (m1 V m2) ) ) & G (m0 → ((∼c2 W m2)) & G (m1 → ((∼c2 W m2)) USI-CMU summer school 2007 Natasha Sharygina 11
  • 12. Automata-based Verification Given: M – LKS over Σ, P ϕ – SE/LTL formula How to check: M╞ ϕ Possible Approach: 1. Convert M into a conventional state-only Kripke structure 2. Convert ϕ into a state-only LTL formula 3. Check whether M╞ ϕ Inefficient! What we do: 1. Interpret ϕ as an LTL formula over Σ U P 2. Compute B~ϕ (using Wring [Somenzi, Bloem’00]) 3. Construct M ⊗ B~ϕ (result is a Buchi automaton) 4. Theorem: We have L (M ⊗ B~ϕ ) = {} iff M╞ ϕ No extra cost in time or space! USI-CMU summer school 2007 Natasha Sharygina 12
  • 13. Verification Results Current State Formula Event Formula State/Event Formula range Aut. Size Time Aut. Size Time Aut. Size Time St Tr BC MC St Tr BC MC St Tr BC MC 4 5 0.25 0.383 6 10 0.245 0.32 3 4 0.184 0.252 2 14 23 0.49 1.141 20 41 1.597 1.77 5 8 0.243 0.391 4 32 57 2.43 4.818 42 92 12.08 12.66 7 12 0.614 0.962 6 58 107 17.5 24.60 72 163 372.8 374.17 9 16 2.622 3.133 8 92 173 196 214.0 X X X X 11 20 33.56 34.5 10 X X X X X X X X 13 24 534.9 536.4 12 X X X X X X X X X X X X 13 USI-CMU summer school 2007 Natasha Sharygina 13
  • 14. Concurrent Software Components synchronize on shared actions proceed independently on local actions Propositions of components are disjoint (no shared variables) USI-CMU summer school 2007 Natasha Sharygina 14
  • 15. Operational Semantics a a M1 → M1’ M 2 → M2 ’ Synchronization on a Shared action (M1 || M2) → (M1’ || M2’) a M1→ M1’ a ∉ Σ (M2) Asynchronous a Execution (M1 || M2) → (M1’ || M2) USI-CMU summer school 2007 Natasha Sharygina 15
  • 16. Operational Semantics State of M1 || M2 is of the form (s1,s2) where si is a state of Mi a a s1 s’1 a ∉ Σ( M2) s2 s’2 a ∉ Σ( M1) a a (s1,s2) (s’1,s2) (s1,s2) (s1,s’2) a a s1 s’1 s2 s’2 a (s1,s2) (s’1,s’2) State-space exponential in # of components USI-CMU summer school 2007 Natasha Sharygina 16
  • 17. Example d d a b c a b’ c 1 2 3 4 1’ 2’ 3’ 4’ M1 Σ = {a,b,c,d} M2 Σ = {a,b’,c,d} d b 3,2’ b’ a c 1,1’ 2,2’ 3,3’ 4,4’ b’ 2,3’ b M1 k M2 USI-CMU summer school 2007 Natasha Sharygina 17
  • 18. Compositional Verification ☺ C Program Predicate Model SE-LTL Yes Abstraction Abstraction Verification System OK Guidance Counter No Example Improved Guided Counterexample Abstraction Guidance Abstraction Refinement ☺ ☺ Abstraction No Counterexample Yes Refinement Valid? Spurious Counterexample USI-CMU summer school 2007 Natasha Sharygina 18
  • 19. Case Studies MicroC/OS-II Real-time OS for embedded applications Widely used (cell phones, medical devices, routers, washing machines…) 6000+ LOC Verified locking discipline Locks and Unlocks alternate and locks are eventually released Found four bugs Missing unlock and return (three known – one unknown) USI-CMU summer school 2007 Natasha Sharygina 19
  • 20. Results Name St-B Tr-B St-Mdl T-BA T-Mdl T-Ver T-Tot Mem SS 25 47 7951 0.690 48.8 6.84 56.9 39.3 SE 20 45 4331 0.497 18.8 2.92 22.8 24.2 SS 25 47 7574 0.699 43.6 1.65 46.4 38.1 SE 18 40 3691 0.407 15.3 1.089 17.3 21.2 SS 25 47 24.8 M 0.874 65.6 X X 851 SE 20 45 13.6M 0.655 33.1 2.17 2207 162 SS 25 47 32.6M 0.836 66.0 X X 347 SE 18 40 15.9M 0.713 34.6 4149 4185 321 BUG 8 14 873 0.205 3.41 0.261 3.88 X USI-CMU summer school 2007 Natasha Sharygina 20
  • 21. Case Studies IPC Module Deployed by a world leader in robotics engineering systems 1500+ LOC 4 components Over 30 billion states after predicate abstraction Discovered synchronization bug in a matter of hours Process can incorrectly block while writing to a queue Undetected despite seven years of testing/industrial use USI-CMU summer school 2007 Natasha Sharygina 21
  • 22. Summary of the Approach State/Event-based modeling and specification Efficient (direct) model checking algorithm CEGAR loop for software systems Safety and liveness properties Compositional software verification Component-wise abstractions Component-wise counterexample validation Component-wise refinements USI-CMU summer school 2007 Natasha Sharygina 22
  • 23. References Sagar Chaki, Edmund M. Clarke, Joël Ouaknine, Natasha Sharygina: Concurrent software verification with states, events, and deadlocks. Formal Aspects of Computing 17(4): 461-483 (2005) Chiara Braghin, Natasha Sharygina, Katerina Barone- Adesi: Automated Verification of Security Policies in Mobile Code, In Proc. of Integrated Formal Methods 2007 conf., LNCS 4591:37 - 54 (2007) USI-CMU summer school 2007 Natasha Sharygina 23