...
- s0 is produced and stored in the tuplespace
- f0 is consumed. It matches s0 and produces the event log contains a COMM event c1 (f0, s0) so a COMM event c1 is raised. s0 is removed from the tuplespace
- p0 is consumed. s0 is no longer there so the continuation is stored in the tuplespace
- Unused COMM event error is raised because c0 never happened
...
- s0 is produced and stored in the tuplespace
- p0 is consumed. It matches s0 and produces a COMM event c0 (p0, s0). Since
- s0 was peeked, it is removed from the tuplespace and replaced with so p0 triggers a produce of s1
- f0 is consumed. It matches s1 and produces a COMM event c1(f0, s1). s1 is removed from the tuplespace
...
- s0 is produced and stored in the tuplespace
- f0 is consumed. It could match s0, but the replay log doesn't contain a COMM event raised by f0 and s0 (f0, s0). f0 is stored in the tuplespace
- p0 is consumed. s0 matches. Since the replay log contains a COMM c0(p0, s0), so s0 is consumed, the COMM event is raised and s0 is removed from the tuplespace.
- s0 was peeked, so p0 triggers a produce of s1. s1 matches f0 raising a COMM event c1(f0, s1)
Implications
The solution above is going to require changes in RSpace and the Rholang reducer.
...