-
Notifications
You must be signed in to change notification settings - Fork 25
Use dot for visualization of counter examples #316
Comments
Looks nice! How do you handle overlapping/concurrent actions? Currently it looks like |
If I'm not mistaken the channel can only serialise the order in which the threads wrote to the channel. It is possible that this order is different from the execution order. So I only take care of the order within the same pid and I think this is the only we can be sure about, by looking the history alone. |
What I mean is that Write from Pid 1 may have finished before Increment from Pid 2, but Pid 2 may have written to the channel before Pid 1. |
Yeah, that's possible. Can you think of a way to improve this situation? Because linearisability relies there being an order of invocation and response events (and of course that they match the actual execution). And it is this order together with the overlaps that we want to visualise, I think. |
Indeed, I've been thinking about this question for some time: is it possible to retrieve the real execution order? I think the answer in general is we can't. Say for example we have two parallel I think all possibilities form a tree, which is a subtree of the whole tree that linearization creates. Maybe we could visualise something like that. |
Why do you want to find the order by (from?) the result? We know when |
That's not enough though to find the order, since these times give us only a interval in which an action was commited. These intervals give a partial order for all actions - we can compare only some of them, but not all of them. The result can give us additional information about the order. By result I mean for example the result of a Read. However even with the resuts we can't be sure about the total order of every action. The more results we have the more we can narrow down to the real order. |
My understanding of the linearisability paper is that the intervals are enough information. We don't know the exact order, and that doesn't matter. The main result says: if we can find points on the intervals for each action, where if the actions were performed atomically at those points, and we can show that this sequential execution (if we pick points on the intervals there will be no overlapping/concurrent actions) is correct (with regard to post-conditions) then the original concurrent execution is correct. (Here's a drawing I made that tries to show what I mean by picking points on the interval.) |
We seem to agree that the exact order is unknown.
You mean enough information about what? |
Yeah, good. :-)
About the execution, to find out if it is correct or to visualise a counterexample it if its not. I guess maybe the misunderstand is in that I thought that you meant that the order we write to the channel might not be the same order as |
I can see what you mean about being able to visualise a possibly better counterexample if you inspect the results (and hence possibly learn a bit more about the order). Not sure if this is worth the effort though? Usually it's quite clear what the problem is once you see the overlapping/concurrent actions. |
The dot graph can be indeed improved in the following way: If a |
As @stevana mentioned
we can use dot for visualizing counter examples.
The text was updated successfully, but these errors were encountered: