Browse files

Remove support for multiple predecessors in backtrack sets

  • Loading branch information...
1 parent 14d4ec6 commit e96b94cf8692c1091f9087d9a18f3ea00d05dfdf @aronisstav aronisstav committed Mar 7, 2013
View
86 src/concuerror_lid.erl
@@ -18,10 +18,7 @@
new/2, start/0, stop/0, to_string/1, root_lid/0,
ets_new/1, ref_new/2, lookup_ref_lid/1]).
--export([make_backtrack/1, select_one_shallow_except_with_fix/2,
- deep_intersect_with_fix/2, insert_to_deep_list/2]).
-
--export_type([lid/0, maybe_lid/0, ets_lid/0, ref_lid/0, lid_sets_list/0]).
+-export_type([lid/0, maybe_lid/0, ets_lid/0, ref_lid/0]).
-include("gen.hrl").
@@ -208,84 +205,3 @@ to_string({name, Name}) when is_atom(Name)->
lists:flatten(io_lib:format("named '~p'", [Name]));
to_string(Lid) ->
"P" ++ Lid.
-
-%%%----------------------------------------------------------------------
-%%% Functions to manipulate LID sets
-%%%----------------------------------------------------------------------
-
--type lid_sets_list() :: [[lid()]].
-
-%% Converts the initail enabled set to an lid_sets_list().
--spec make_backtrack([lid()]) -> lid_sets_list().
-
-make_backtrack(LidList) ->
- case LidList =:= [] of
- true -> [];
- false -> [[H] || H <- LidList]
- end.
-
-%% Picks and returns the first lid of the first list of DeepList if it is not
-%% one of those in Exceptions, returning also a changed DeepList. Exceptions has
-%% simply lids(). If a set of lids() has more than one element the first is
-%% picked and the rest are thrown away.
--spec select_one_shallow_except_with_fix(lid_sets_list(), [lid()]) ->
- 'none' |
- {'ok', lid(), lid_sets_list()}.
-
-select_one_shallow_except_with_fix(DeepList, Exceptions) ->
- select_one_shallow_except_with_fix(DeepList, Exceptions, []).
-
-select_one_shallow_except_with_fix([[DH,_|_]|T] , _, Acc) ->
- {ok, DH, lists:reverse(Acc, [[DH]|T])};
-select_one_shallow_except_with_fix([ [H]|_] = DL, [], Acc) ->
- {ok, H, lists:reverse(Acc, DL)};
-select_one_shallow_except_with_fix([ [H]|T] , [H|XT], Acc) ->
- select_one_shallow_except_with_fix(T, XT, [[H]|Acc]);
-select_one_shallow_except_with_fix([ [H]|_] = DL, [X|XT], Acc) ->
- case H < X of
- true -> {ok, H, lists:reverse(Acc, DL)};
- false -> select_one_shallow_except_with_fix(DL, XT, Acc)
- end;
-select_one_shallow_except_with_fix( [] , _, _) ->
- none.
-
-%% Checks if any of the elements in List is also in one of the sets in
-%% DeepList. Returns a changed DeepList if a matching set is found: the matching
-%% set is intersectioned with the elements of the List.
--spec deep_intersect_with_fix(lid_sets_list(), [lid()]) ->
- 'false' |
- {'true', lid_sets_list()}.
-
-deep_intersect_with_fix(DeepList, List) ->
- deep_intersect_with_fix(DeepList, List, []).
-
-deep_intersect_with_fix([H|T] = DL, L, Acc) ->
- case H of
- [Single] ->
- case ordsets:is_element(Single, L) of
- true -> {true, lists:reverse(Acc, DL)};
- false -> deep_intersect_with_fix(T, L, [H|Acc])
- end;
- _Other ->
- case ordsets:intersection(H, L) of
- [] -> deep_intersect_with_fix(T, L, [H|Acc]);
- Else ->
- {true, lists:reverse(Acc, insert_to_deep_list(T, Else))}
- end
- end;
-deep_intersect_with_fix([], _, _) -> false.
-
-%% Adds a List to a DeepList with which it did not satisfy
-%% deep_intersect_with_list.
--spec insert_to_deep_list(lid_sets_list(), [lid()]) -> lid_sets_list().
-
-insert_to_deep_list(DeepList, List) ->
- insert_to_deep_list(DeepList, List, []).
-
-insert_to_deep_list([[DH|_] = H|T], [NH|_] = N, Acc) ->
- case NH < DH of
- true -> lists:reverse(Acc, [N, H|T]);
- false -> insert_to_deep_list(T, N, [H|Acc])
- end;
-insert_to_deep_list([], N, Acc) ->
- lists:reverse([N|Acc]).
View
97 src/concuerror_sched.erl
@@ -192,9 +192,7 @@ interleave_aux(Target, PreBound, Parent, Dpor, Options) ->
enabled = ordsets:new() :: ordsets:ordset(concuerror_lid:lid()),
blocked = ordsets:new() :: ordsets:ordset(concuerror_lid:lid()),
pollable = ordsets:new() :: ordsets:ordset(concuerror_lid:lid()),
- backtrack = ordsets:new() :: [concuerror_lid:lid() |
- ordsets:ordset(
- concuerror_lid:lid())],
+ backtrack = ordsets:new() :: ordsets:ordset(concuerror_lid:lid()),
done = ordsets:new() :: ordsets:ordset(concuerror_lid:lid()),
sleep_set = ordsets:new() :: ordsets:ordset(concuerror_lid:lid()),
nexts = dict:new() :: dict(), % dict(lid(), instr()),
@@ -246,11 +244,10 @@ start_target(Target) ->
update_lid_enabled(FirstLid, Next, New, MaybeEnabled, New),
%% FIXME: check_messages and poll should also be called here for
%% instrumenting "black" initial messages.
- Backtrack = concuerror_lid:make_backtrack(Enabled),
TraceTop =
#trace_state{nexts = dict:store(FirstLid, Next, dict:new()),
enabled = Enabled, blocked = Blocked,
- backtrack = Backtrack, pollable = Pollable},
+ backtrack = Enabled, pollable = Pollable},
{[TraceTop], GroupLeader}.
start_target_op(Target) ->
@@ -301,11 +298,11 @@ select_from_backtrack(#dpor_state{must_replay = MustReplay,
Done = TraceTop#trace_state.done,
?debug("------------\nExplore ~p\n------------\n",
[TraceTop#trace_state.i + 1]),
- case concuerror_lid:select_one_shallow_except_with_fix(Backtrack, Done) of
- none ->
+ case ordsets:subtract(Backtrack, Done) of
+ [] ->
?debug("Backtrack set explored\n",[]),
none;
- {ok, SelectedLid, NewBacktrack} ->
+ [SelectedLid|_] ->
State =
case MustReplay of
true -> replay_trace(MightNeedReplayState);
@@ -315,8 +312,7 @@ select_from_backtrack(#dpor_state{must_replay = MustReplay,
Instruction = dict:fetch(SelectedLid, NewTraceTop#trace_state.nexts),
NewDone = ordsets:add_element(SelectedLid, Done),
FinalTraceTop =
- NewTraceTop#trace_state{backtrack = NewBacktrack,
- done = NewDone},
+ NewTraceTop#trace_state{done = NewDone},
FinalState = State#dpor_state{trace = [FinalTraceTop|RestTrace]},
{ok, Instruction, FinalState}
end.
@@ -489,43 +485,42 @@ add_all_backtracks_trace(Transition, Lid, ClockVector, PreBound, Flavor,
PreSI|Rest] = Trace,
Candidates =
ordsets:subtract(Enabled, ordsets:union(SleepSet, Done)),
- {Predecessors, Initial} =
+ {Predecessor, Initial} =
find_preds_and_initials(Lid, ProcSI, Candidates,
I, ClockVector, Acc),
case Flavor of
full ->
?debug(" Backtrack: ~p\n", [Backtrack]),
- ?debug(" Predecess: ~p\n", [Predecessors]),
+ ?debug(" Predecess: ~p\n", [Predecessor]),
?debug(" SleepSet : ~p\n", [SleepSet]),
?debug(" Initial : ~p\n", [Initial]),
- case Predecessors =:= [] of
- true ->
+ case Predecessor of
+ [] ->
?debug(" All sleeping...\n"),
NewClockVector =
lookup_clock(ProcSI, ClockMap),
MaxClockVector =
max_cv(NewClockVector, ClockVector),
{continue, ProcSI, MaxClockVector};
- false ->
+ [P] ->
+ Intersection =
+ ordsets:intersection(Backtrack, Initial),
NewBacktrack =
- case concuerror_lid:deep_intersect_with_fix(
- Backtrack, Initial) of
- {true, R} ->
+ case Intersection =/= [] of
+ true ->
?debug(" Init in backtrack\n"),
- R;
+ Backtrack;
false ->
- ?debug(" Add: ~p\n",
- [Predecessors]),
- concuerror_lid:insert_to_deep_list(
- Backtrack, Predecessors)
+ ?debug(" Add: ~p\n", [P]),
+ ordsets:add_element(P ,Backtrack)
end,
?debug(" NewBacktrack: ~p\n",[NewBacktrack]),
{done,
[PreSI#trace_state{backtrack = NewBacktrack}
|Rest]}
end;
flanagan ->
- decide_flanagan(Predecessors, Backtrack,
+ decide_flanagan(Predecessor, Backtrack,
Candidates, PreSI, Rest)
end
end,
@@ -557,9 +552,8 @@ find_preds_and_initials(Lid, ProcSI, Candidates, I, ClockVector, RevTrace) ->
true -> NonRacing;
false -> ordsets:add_element(Lid, NonRacing)
end,
- Predecessors =
- ordsets:add_element(Lid, predecessors(Candidates, I, ClockVector)),
- {ordsets:intersection(Predecessors, Initial), Initial}.
+
+ {predecessor(Initial, I, ClockVector), Initial}.
find_initials(Candidates, ProcSI, I, RevTrace) ->
RealCandidates = ordsets:del_element(ProcSI, Candidates),
@@ -588,43 +582,27 @@ find_initials(Candidates, I, [Top|Rest], Racing, NonRacing) ->
find_initials(NewCandidates, I, Rest, NewRacing, NewNonRacing)
end.
-predecessors(Candidates, I, ClockVector) ->
- Fold =
- fun(Lid, Acc) ->
- Clock = lookup_clock_value(Lid, ClockVector),
- ?debug(" ~p: ~p\n",[Lid, Clock]),
- case Clock > I of
- false -> Acc;
- true -> ordsets:add_element(Lid, Acc)
- end
- end,
- lists:foldl(Fold, ordsets:new(), Candidates).
+predecessor(Initial, I, ClockVector) ->
+ DropWhile = fun(Lid) -> lookup_clock_value(Lid, ClockVector) < I end,
+ case lists:dropwhile(DropWhile, Initial) of
+ [] -> [];
+ [H|_] -> [H]
+ end.
-decide_flanagan(Predecessors, Backtrack, Candidates, PreSI, Rest) ->
- case concuerror_lid:deep_intersect_with_fix(Backtrack, Predecessors) of
- {true, NewBacktrack} ->
+decide_flanagan(Predecessor, Backtrack, Candidates, PreSI, Rest) ->
+ case ordsets:intersection(Backtrack, Predecessor) =/= [] of
+ true ->
?debug("One pred already in backtrack.\n"),
- {done, [PreSI#trace_state{backtrack = NewBacktrack}|Rest]};
+ {done, [PreSI|Rest]};
false ->
NewBacktrack =
- case Predecessors =:= [] of
+ case Predecessor =:= [] of
false ->
- ?debug(" Add as 'choose-one': ~p\n", [Predecessors]),
- concuerror_lid:insert_to_deep_list(Backtrack,
- Predecessors);
+ ?debug(" Add as 'choose-one': ~p\n", [Predecessor]),
+ ordsets:union(Backtrack, Predecessor);
true ->
?debug(" Add as 'choose every': ~p\n", [Candidates]),
- Fold =
- fun(E, AccBacktrack) ->
- case concuerror_lid:deep_intersect_with_fix(
- AccBacktrack, [E]) of
- {true, New} -> New;
- false ->
- concuerror_lid:insert_to_deep_list(
- AccBacktrack, [E])
- end
- end,
- lists:foldl(Fold, Backtrack, Candidates)
+ ordsets:union(Backtrack, Candidates)
end,
NewPreSI =
PreSI#trace_state{backtrack = NewBacktrack},
@@ -978,7 +956,7 @@ add_some_next_to_backtrack(State) ->
error_nxt = ErrorNext, last = {Lid, _, _},
preemptions = Preemptions} = TraceTop,
?debug("Pick next: Enabled: ~p Sleeping: ~p\n", [Enabled, SleepSet]),
- Choice =
+ Backtrack =
case ordsets:subtract(ErrorNext, SleepSet) of
[] ->
case Flavor of
@@ -999,8 +977,7 @@ add_some_next_to_backtrack(State) ->
end;
[H|_] -> [H]
end,
- ?debug("Picked: ~p\n",[Choice]),
- Backtrack = concuerror_lid:make_backtrack(Choice),
+ ?debug("Picked: ~p\n",[Backtrack]),
NewTraceTop = TraceTop#trace_state{backtrack = Backtrack},
State#dpor_state{trace = [NewTraceTop|Rest]}.
View
24 testsuite/suites/dpor/results/depend_2-depend_2-inf-dpor.txt
@@ -1,5 +1,5 @@
-Checked 18 interleaving(s). 12 errors found.
- Encountered 6 sleep-set blocked trace(s).
+Checked 20 interleaving(s). 12 errors found.
+ Encountered 8 sleep-set blocked trace(s).
1
Error type : Deadlock
@@ -285,15 +285,15 @@ Blocked processes : P1
Process P1 blocks
Process P1.4: ets_insert {table,[{x,1}]}
Process P1.4 exits (normal)
- Process P1.3: ets_lookup {table,y}
- Process P1.2: ets_insert {table,[{y,1}]}
- Process P1.2 exits (normal)
- Process P1.3 exits (normal)
Process P1.5: ets_lookup {table,x}
Process P1.5: ets_lookup {table,y}
- Process P1.5: ets_lookup {table,z}
+ Process P1.2: ets_insert {table,[{y,1}]}
+ Process P1.3: ets_lookup {table,y}
+ Process P1.3: ets_lookup {table,z}
Process P1.1: ets_insert {table,[{z,1}]}
Process P1.1 exits (normal)
+ Process P1.2 exits (normal)
+ Process P1.3 exits (normal)
Process P1.5 exits (normal)
@@ -310,17 +310,17 @@ Blocked processes : P1
Process P1 spawns process P1.4
Process P1 spawns process P1.5
Process P1 blocks
+ Process P1.3: ets_lookup {table,y}
+ Process P1.2: ets_insert {table,[{y,1}]}
+ Process P1.2 exits (normal)
+ Process P1.3 exits (normal)
Process P1.4: ets_insert {table,[{x,1}]}
Process P1.4 exits (normal)
Process P1.5: ets_lookup {table,x}
Process P1.5: ets_lookup {table,y}
- Process P1.2: ets_insert {table,[{y,1}]}
- Process P1.3: ets_lookup {table,y}
- Process P1.3: ets_lookup {table,z}
+ Process P1.5: ets_lookup {table,z}
Process P1.1: ets_insert {table,[{z,1}]}
Process P1.1 exits (normal)
- Process P1.2 exits (normal)
- Process P1.3 exits (normal)
Process P1.5 exits (normal)
View
88 testsuite/suites/dpor/results/etsi_6-etsi_6-inf-dpor.txt
@@ -351,18 +351,18 @@ Details : {{nocatch,[{z,0},{xy,{1,0}},{z5,0}]},
Process P1 spawns process P1.5
Process P1 blocks
Process P1.1: ets_insert {table,[{18,ok}]}
- Process P1.4: ets_insert {table,[{46,ok}]}
Process P1.2: ets_insert {table,[{x,1}]}
Process P1.2 blocks
+ Process P1.3: ets_insert {table,[{33,ok}]}
+ Process P1.3: ets_lookup {table,x}
+ Process P1.3: ets_insert {table,[{35,ok}]}
+ Process P1.3 blocks
+ Process P1.4: ets_insert {table,[{46,ok}]}
Process P1.4: ets_lookup {table,x}
Process P1.4: ets_insert {table,[{48,ok}]}
Process P1.4: ets_lookup {table,y}
Process P1.1: ets_insert {table,[{y,1}]}
Process P1.1 blocks
- Process P1.3: ets_insert {table,[{33,ok}]}
- Process P1.3: ets_lookup {table,x}
- Process P1.3: ets_insert {table,[{35,ok}]}
- Process P1.3 blocks
Process P1.4: ets_insert {table,[{xy,{1,0}}]}
Process P1.4 blocks
Process P1.5: ets_insert {table,[{56,ok}]}
@@ -391,7 +391,7 @@ Details : {{nocatch,[{z,0},{xy,{1,0}},{z5,0}]},
8
Error type : Exception
-Details : {{nocatch,[{z,1},{xy,{1,0}},{z5,1}]},
+Details : {{nocatch,[{z,0},{xy,{0,0}},{z5,0}]},
[{etsi_6,etsi_6,0,[{file,"etsi_6.erl"},{line,67}]}]}
Process P1: ets_new {table,[public,named_table]}
Process P1: ets_insert {table,[{x,0}]}
@@ -406,24 +406,23 @@ Details : {{nocatch,[{z,1},{xy,{1,0}},{z5,1}]},
Process P1 spawns process P1.5
Process P1 blocks
Process P1.1: ets_insert {table,[{18,ok}]}
- Process P1.4: ets_insert {table,[{46,ok}]}
Process P1.3: ets_insert {table,[{33,ok}]}
- Process P1.3: ets_lookup {table,x}
+ Process P1.4: ets_insert {table,[{46,ok}]}
+ Process P1.4: ets_lookup {table,x}
Process P1.2: ets_insert {table,[{x,1}]}
Process P1.2 blocks
- Process P1.4: ets_lookup {table,x}
+ Process P1.3: ets_lookup {table,x}
+ Process P1.3: ets_insert {table,[{35,ok}]}
+ Process P1.3 blocks
Process P1.4: ets_insert {table,[{48,ok}]}
Process P1.4: ets_lookup {table,y}
Process P1.1: ets_insert {table,[{y,1}]}
Process P1.1 blocks
- Process P1.3: ets_insert {table,[{35,ok}]}
- Process P1.3: ets_insert {table,[{z,1}]}
- Process P1.3 blocks
- Process P1.4: ets_insert {table,[{xy,{1,0}}]}
+ Process P1.4: ets_insert {table,[{xy,{0,0}}]}
Process P1.4 blocks
Process P1.5: ets_insert {table,[{56,ok}]}
Process P1.5: ets_lookup {table,z}
- Process P1.5: ets_insert {table,[{z5,1}]}
+ Process P1.5: ets_insert {table,[{z5,0}]}
Process P1.5 sends message `ok` to process P1.4
Process P1.5 exits (normal)
Process P1.4 receives message `ok` from process P1.5
@@ -447,7 +446,7 @@ Details : {{nocatch,[{z,1},{xy,{1,0}},{z5,1}]},
9
Error type : Exception
-Details : {{nocatch,[{z,1},{xy,{1,0}},{z5,0}]},
+Details : {{nocatch,[{z,1},{xy,{1,0}},{z5,1}]},
[{etsi_6,etsi_6,0,[{file,"etsi_6.erl"},{line,67}]}]}
Process P1: ets_new {table,[public,named_table]}
Process P1: ets_insert {table,[{x,0}]}
@@ -462,24 +461,24 @@ Details : {{nocatch,[{z,1},{xy,{1,0}},{z5,0}]},
Process P1 spawns process P1.5
Process P1 blocks
Process P1.1: ets_insert {table,[{18,ok}]}
- Process P1.4: ets_insert {table,[{46,ok}]}
Process P1.3: ets_insert {table,[{33,ok}]}
Process P1.3: ets_lookup {table,x}
Process P1.2: ets_insert {table,[{x,1}]}
Process P1.2 blocks
+ Process P1.3: ets_insert {table,[{35,ok}]}
+ Process P1.3: ets_insert {table,[{z,1}]}
+ Process P1.3 blocks
+ Process P1.4: ets_insert {table,[{46,ok}]}
Process P1.4: ets_lookup {table,x}
Process P1.4: ets_insert {table,[{48,ok}]}
Process P1.4: ets_lookup {table,y}
Process P1.1: ets_insert {table,[{y,1}]}
Process P1.1 blocks
- Process P1.3: ets_insert {table,[{35,ok}]}
- Process P1.5: ets_insert {table,[{56,ok}]}
- Process P1.5: ets_lookup {table,z}
- Process P1.3: ets_insert {table,[{z,1}]}
- Process P1.3 blocks
Process P1.4: ets_insert {table,[{xy,{1,0}}]}
Process P1.4 blocks
- Process P1.5: ets_insert {table,[{z5,0}]}
+ Process P1.5: ets_insert {table,[{56,ok}]}
+ Process P1.5: ets_lookup {table,z}
+ Process P1.5: ets_insert {table,[{z5,1}]}
Process P1.5 sends message `ok` to process P1.4
Process P1.5 exits (normal)
Process P1.4 receives message `ok` from process P1.5
@@ -503,7 +502,7 @@ Details : {{nocatch,[{z,1},{xy,{1,0}},{z5,0}]},
10
Error type : Exception
-Details : {{nocatch,[{z,0},{xy,{0,0}},{z5,0}]},
+Details : {{nocatch,[{z,1},{xy,{1,0}},{z5,0}]},
[{etsi_6,etsi_6,0,[{file,"etsi_6.erl"},{line,67}]}]}
Process P1: ets_new {table,[public,named_table]}
Process P1: ets_insert {table,[{x,0}]}
@@ -518,22 +517,23 @@ Details : {{nocatch,[{z,0},{xy,{0,0}},{z5,0}]},
Process P1 spawns process P1.5
Process P1 blocks
Process P1.1: ets_insert {table,[{18,ok}]}
+ Process P1.3: ets_insert {table,[{33,ok}]}
+ Process P1.3: ets_lookup {table,x}
+ Process P1.2: ets_insert {table,[{x,1}]}
+ Process P1.2 blocks
+ Process P1.3: ets_insert {table,[{35,ok}]}
+ Process P1.5: ets_insert {table,[{56,ok}]}
+ Process P1.5: ets_lookup {table,z}
+ Process P1.3: ets_insert {table,[{z,1}]}
+ Process P1.3 blocks
Process P1.4: ets_insert {table,[{46,ok}]}
Process P1.4: ets_lookup {table,x}
Process P1.4: ets_insert {table,[{48,ok}]}
Process P1.4: ets_lookup {table,y}
Process P1.1: ets_insert {table,[{y,1}]}
Process P1.1 blocks
- Process P1.2: ets_insert {table,[{x,1}]}
- Process P1.2 blocks
- Process P1.3: ets_insert {table,[{33,ok}]}
- Process P1.3: ets_lookup {table,x}
- Process P1.3: ets_insert {table,[{35,ok}]}
- Process P1.3 blocks
- Process P1.4: ets_insert {table,[{xy,{0,0}}]}
+ Process P1.4: ets_insert {table,[{xy,{1,0}}]}
Process P1.4 blocks
- Process P1.5: ets_insert {table,[{56,ok}]}
- Process P1.5: ets_lookup {table,z}
Process P1.5: ets_insert {table,[{z5,0}]}
Process P1.5 sends message `ok` to process P1.4
Process P1.5 exits (normal)
@@ -573,19 +573,19 @@ Details : {{nocatch,[{z,1},{xy,{0,0}},{z5,1}]},
Process P1 spawns process P1.5
Process P1 blocks
Process P1.1: ets_insert {table,[{18,ok}]}
- Process P1.4: ets_insert {table,[{46,ok}]}
- Process P1.4: ets_lookup {table,x}
- Process P1.4: ets_insert {table,[{48,ok}]}
- Process P1.4: ets_lookup {table,y}
- Process P1.1: ets_insert {table,[{y,1}]}
- Process P1.1 blocks
Process P1.3: ets_insert {table,[{33,ok}]}
Process P1.3: ets_lookup {table,x}
+ Process P1.4: ets_insert {table,[{46,ok}]}
+ Process P1.4: ets_lookup {table,x}
Process P1.2: ets_insert {table,[{x,1}]}
Process P1.2 blocks
Process P1.3: ets_insert {table,[{35,ok}]}
Process P1.3: ets_insert {table,[{z,1}]}
Process P1.3 blocks
+ Process P1.4: ets_insert {table,[{48,ok}]}
+ Process P1.4: ets_lookup {table,y}
+ Process P1.1: ets_insert {table,[{y,1}]}
+ Process P1.1 blocks
Process P1.4: ets_insert {table,[{xy,{0,0}}]}
Process P1.4 blocks
Process P1.5: ets_insert {table,[{56,ok}]}
@@ -629,21 +629,21 @@ Details : {{nocatch,[{z,1},{xy,{0,0}},{z5,0}]},
Process P1 spawns process P1.5
Process P1 blocks
Process P1.1: ets_insert {table,[{18,ok}]}
- Process P1.4: ets_insert {table,[{46,ok}]}
- Process P1.4: ets_lookup {table,x}
- Process P1.4: ets_insert {table,[{48,ok}]}
- Process P1.4: ets_lookup {table,y}
- Process P1.1: ets_insert {table,[{y,1}]}
- Process P1.1 blocks
Process P1.3: ets_insert {table,[{33,ok}]}
Process P1.3: ets_lookup {table,x}
+ Process P1.4: ets_insert {table,[{46,ok}]}
+ Process P1.4: ets_lookup {table,x}
Process P1.2: ets_insert {table,[{x,1}]}
Process P1.2 blocks
Process P1.3: ets_insert {table,[{35,ok}]}
Process P1.5: ets_insert {table,[{56,ok}]}
Process P1.5: ets_lookup {table,z}
Process P1.3: ets_insert {table,[{z,1}]}
Process P1.3 blocks
+ Process P1.4: ets_insert {table,[{48,ok}]}
+ Process P1.4: ets_lookup {table,y}
+ Process P1.1: ets_insert {table,[{y,1}]}
+ Process P1.1 blocks
Process P1.4: ets_insert {table,[{xy,{0,0}}]}
Process P1.4 blocks
Process P1.5: ets_insert {table,[{z5,0}]}

0 comments on commit e96b94c

Please sign in to comment.