aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ravanan/propnet.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/ravanan/propnet.scm b/ravanan/propnet.scm
index 52a00bc..a8a549e 100644
--- a/ravanan/propnet.scm
+++ b/ravanan/propnet.scm
@@ -128,7 +128,12 @@ add to the inbox."
(cons propagator-input-name
(maybe-assoc-ref (just cells) cell-name))))
(propagator-inputs propagator))))
-
+
+ ;; We implement propagator networks as a state machine. The state consists of
+ ;; the current values of all the cells and the list of all propagators
+ ;; currently in flight. Each iteration of loop represents one state
+ ;; transition. This is a very functional approach. Propagator network
+ ;; implementations don't necessarily have to be mutational.
(let loop ((cells (list))
(cell-values-inbox initial-cell-values)
;; Pre-schedule all propagators to ensure we trigger those