diff options
author | Arun Isaac | 2024-09-19 17:03:54 +0100 |
---|---|---|
committer | Arun Isaac | 2024-09-19 18:49:30 +0100 |
commit | 377e114834f6157effd205dad5b7078aea12e8d4 (patch) | |
tree | df8e6166ff68bb0afe679da42d27baae2e83a01e | |
parent | 64a5cf9d2d4f279eb1560523bf0f8048568811dd (diff) | |
download | ravanan-377e114834f6157effd205dad5b7078aea12e8d4.tar.gz ravanan-377e114834f6157effd205dad5b7078aea12e8d4.tar.lz ravanan-377e114834f6157effd205dad5b7078aea12e8d4.zip |
propnet: Describe state machine implementation.
* ravanan/propnet.scm (run-propnet): Add comment describing state
machine implementation.
-rw-r--r-- | ravanan/propnet.scm | 7 |
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 |