event queue:
check queue:
	time	eid	pid	event
	0	0	1	null
a : bool a = 0
b : bool b = 0
c : bool c = 0
e : bool e = 0
step 5 
	0	0	1	null
	10	1	0	
	20	27	0	c := false
	20	28	0	e := false
	30	26	0	
event queue:
check queue:
	time	eid	pid	event
	40	2	0	
a : bool a = 0
b : bool b = 0
c : bool c = 0
e : bool e = 0
time: 30
event[25]: wait: [e], pid: 0, #pred: 1, succ: 24 
bool deps: 4 
source: [e]
status: (currently not subscribed to its dependencies)
in queue: no
in check queue: no
All event subscriptions:
step 1 
	40	2	0	
event[25]: wait: [e], pid: 0, #pred: 1, succ: 24 
bool deps: 4 
source: [e]
status: (currently not subscribed to its dependencies)
in queue: no
in check queue: yes
All event subscriptions:
step 1 
	50	18	0	[~e]
All event subscriptions:
event queue:
check queue:
	time	eid	pid	event
	50	25	0	[e]
	60	17	0	
step 4 
	60	17	0	
	70	15	0	a := false
	70	16	0	b := false
	80	14	0	
event 25 still subscribed to `e' 
event queue:
check queue:
	time	eid	pid	event
	90	13	0	e := true
event[25]: wait: [e], pid: 0, #pred: 1, succ: 24 
bool deps: 4 
source: [e]
status: (blocked and subscribed to its dependencies)
in queue: no
in check queue: no
All event subscriptions:
bool[4]: "e" : 25 
	90	13	0	e := true
should wake up event 25, now in queue 
event queue:
	time	eid	pid	event
	90	25	0	[e]
check queue:
	100	12	0	a := false
event[25]: wait: [e], pid: 0, #pred: 1, succ: 24 
bool deps: 4 
source: [e]
status: (currently not subscribed to its dependencies)
in queue: yes
in check queue: no
All event subscriptions:
should have no more subscriptions 
event[24]: select: [ a -> ... [] b -> ... ], pid: 0, #pred: 1, succ: 22 23 
bool deps: 1 2 
source: deterministic: {
  a -> c := c
  b -> c := c
}
status: (currently not subscribed to its dependencies)
in queue: no
in check queue: no
step 4 
	90	25	0	[e]
	100	12	0	a := false
	110	11	0	b := false
	120	10	0	a := false
event queue:
check queue:
	time	eid	pid	event
	130	9	0	b := false
event 24 should be subscribed to `a' and `b' 
event[24]: select: [ a -> ... [] b -> ... ], pid: 0, #pred: 1, succ: 22 23 
bool deps: 1 2 
source: deterministic: {
  a -> c := c
  b -> c := c
}
status: (blocked and subscribed to its dependencies)
in queue: no
in check queue: no
All event subscriptions:
bool[1]: "a" : 24 
bool[2]: "b" : 24 
a : bool a = 0
b : bool b = 0
c : bool c = 0
e : bool e = 1
step 2 
	130	9	0	b := false
	140	8	0	[ c -> ... [] else -> ... ]
time: 140
event queue:
check queue:
	time	eid	pid	event
	150	7	0	b := false
event[24]: select: [ a -> ... [] b -> ... ], pid: 0, #pred: 1, succ: 22 23 
bool deps: 1 2 
source: deterministic: {
  a -> c := c
  b -> c := c
}
status: (blocked and subscribed to its dependencies)
in queue: no
in check queue: no
All event subscriptions:
bool[1]: "a" : 24 
bool[2]: "b" : 24 
	150	7	0	b := false
now a+ should release event 24 
	160	6	0	a := true
event queue:
	time	eid	pid	event
	160	24	0	[ a -> ... [] b -> ... ]
check queue:
	170	3	0	null
event[24]: select: [ a -> ... [] b -> ... ], pid: 0, #pred: 1, succ: 22 23 
bool deps: 1 2 
source: deterministic: {
  a -> c := c
  b -> c := c
}
status: (currently not subscribed to its dependencies)
in queue: yes
in check queue: no
All event subscriptions:
step 3 
	160	24	0	[ a -> ... [] b -> ... ]
	170	3	0	null
	170	22	0	c := c
event queue:
check queue:
	time	eid	pid	event
	180	18	0	[~e]
	180	21	0	null
step 
	180	21	0	null
event queue:
check queue:
	time	eid	pid	event
	190	20	0	c := ~c
event 18 should now be blocked on `e' 
event[18]: wait: [~e], pid: 0, #pred: 1, succ: 17 
bool deps: 4 
source: [~e]
status: (blocked and subscribed to its dependencies)
in queue: no
in check queue: no
All event subscriptions:
bool[4]: "e" : 18 
step 2 
	190	20	0	c := ~c
	200	19	0	e := false
time: 200
event 18 should be released 
event queue:
	time	eid	pid	event
	200	18	0	[~e]
check queue:
	210	25	0	[e]
event[18]: wait: [~e], pid: 0, #pred: 1, succ: 17 
bool deps: 4 
source: [~e]
status: (currently not subscribed to its dependencies)
in queue: yes
in check queue: no
step 2 
	200	18	0	[~e]
	210	17	0	
All event subscriptions:
bool[4]: "e" : 25 
now event 25 is waiting for handshake on `e' 
step 3 
	220	15	0	a := false
	220	16	0	b := false
	230	14	0	
event queue:
check queue:
	time	eid	pid	event
	240	13	0	e := true
time: 230
now we just let it run a while... 
