tonyg / syndicate

syn·di·cate: a language for interactive programs
http://syndicate-lang.org/
GNU Lesser General Public License v3.0
152 stars 11 forks source link

Facet termination event handler ordering is not right #23

Closed tonyg closed 7 years ago

tonyg commented 7 years ago

Running example-termination-scripts-1.rkt highlights many of the problems I'm currently thinking about wrt termination ordering. Just now (as of commit 37cee0c) I got the following output:

starting; x=1
starting; x=1; y=2
on E: f; x=1
stopping; x=1; y=2
on-stop: e; x=1; y=2
stopping; x=1
on-stop: h; x=1
on E: a; x=1; y=2
on E: b; x=1; y=2
stop-when E: g; x=1
stop-when E: c; x=1; y=2
stop-when E: d; x=1; y=2
stop-when E: innermost
INNERMOST STOPPING
INNERMOST STARTING
on rising-edge #t
stop-when rising-edge #t

There's a lot to complain about there. Most glaringly, the INNERMOST STOPPING event is firing before the INNERMOST STARTING event!

I need to (1) analyze the output to see all the problems in it, and then (2) fix them.

tonyg commented 7 years ago

Tentative fix for these in 76c1a5b3478eed5130099060e4e7c2df8d9d7281 and 6db1e67a7e4f51016b3ab1c59bd7531a7ac44045.

tonyg commented 7 years ago

I'm happy with termination now.