You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is now half-done: #185 implements enforcing the correctness invariants.
However, the sleep set invariant does not hold, so there's a problem somewhere. Fortunately I am pretty sure that we're just forgetting to remove a dependent transition from the set somewhere, so it's no great concern. But it would be good to fix that to close off this issue.
{ dporTodo = dporTodo dpor `M.union`M.fromList todo
, dporNext =Just (tid, child)
}
I think the way to do this would be a function like:
verifyDPOR::String->DPOR->DPOR
verifyDPOR src dpor
|{- if invariant 1 fails -}= fatal src "thread exists in todo set but not in runnable set"|{- ... -}|otherwise= dpor
There's no need to check the recursive case, as if a DPOR value is recursively valid, then it remains valid even if we attach it to an invalid DPOR value via dporNext. So as long as verifyDPOR gets called everywhere a DPOR value is created or updated, we ensure correctness.
The text was updated successfully, but these errors were encountered:
barrucadu
changed the title
Check DPOR data invariants at construction time
Failing to remove dependent transitions from the sleep set, somewhere
Feb 16, 2018
This is now half-done: #185 implements enforcing the correctness invariants.
However, the sleep set invariant does not hold, so there's a problem somewhere. Fortunately I am pretty sure that we're just forgetting to remove a dependent transition from the set somewhere, so it's no great concern. But it would be good to fix that to close off this issue.
dejafu/dejafu/Test/DejaFu/SCT/Internal/DPOR.hs
Lines 37 to 59 in 5237eff
There are some data invariants associated with
DPOR
values:dporTodo
is a subset ofdporRunnable
dporDone
is a subset ofdporRunnable
dporTaken
is a subset ofdporDone
dporTodo
anddporDone
are disjointdporNext
thread (if there is one) is indporDone
There's also this one, which is more of a performance issue than a correctness issue:
dporSleep
anddporDone
are disjointIt would be good to check these invariants everywhere they could in principle be broken (all functions which produce a
DPOR
):dejafu/dejafu/Test/DejaFu/SCT/Internal/DPOR.hs
Lines 158 to 164 in 5237eff
dejafu/dejafu/Test/DejaFu/SCT/Internal/DPOR.hs
Lines 174 to 191 in 5237eff
dejafu/dejafu/Test/DejaFu/SCT/Internal/DPOR.hs
Lines 290 to 293 in 5237eff
I think the way to do this would be a function like:
There's no need to check the recursive case, as if a
DPOR
value is recursively valid, then it remains valid even if we attach it to an invalidDPOR
value viadporNext
. So as long asverifyDPOR
gets called everywhere aDPOR
value is created or updated, we ensure correctness.The text was updated successfully, but these errors were encountered: