SLIDE 55 Dynamic Validation Algorithm
Data: trace window υ, event e ∈ E generated by thread t ∈ T
1 if ∃̺ ∈ R, r ∈ [̺]υ t : e = end(r) then 2
for σ ∈ C(̺), u ∈ T : u t do
3
if ∃s ∈ [σ]υ
u : start(s) ⊀hb start(r) ∧ end(r) ⊀hb end(s) then r is violated by s ; 4
if ∃s ∈ [σ]τ
u : start(s) ∈ υ ∧ end(s) υ then 5
if start(s) ≺hb start(r) then
6
if ∃r′ ∈ [̺]υ
t : r′ r ∧ start(s) ⊀hb start(r′) then PV̺,σ t
(u) = VCend(r′)(t) ;
7
if ∃r′ ∈ [̺]υ
t : r′ r then υ → r′ ; 8 if σ ∈ S, s ∈ [σ]υ t : end(s) = e then 9
if ∃s′ ∈ [σ]υ
t : s′ s then υ → s′ ; 10
for ̺ ∈ C(σ), u ∈ T : u t do
11
if ∃r ∈ [̺]υ
u : start(s) ⊀hb start(r) ∧ end(r) ⊀hb end(s) then r is violated by s ; 12
if PV̺,σ
u
(t) 0 ∧ PV̺,σ
u
(t) ≤ VCend(s)(u) then
13
an instance of ̺ is violated by s;
Jan Fiedor (BUT) Verifying Programs using Contracts ICST, March 15, 2017 12 / 17