Fri Mar 26 08:36:58 CET 2010

Pull FRP

What about a special form that expands to a dynamic "trigger",
i.e. check type types a t run time and recompute values if

Problem: make the up-to-date check 1-shot.  To avoid exponential
explosion re-checking dependencies down the three, in a single
evaluation, only check once for every node + cache result.

This means it should be clear what a "pull" event is: it's a global

In other terms: a pull, and all its child pulls, happen at a single
instance in time.

Given a reactive network N, and a set of output nodes O, compute the
value of the output nodes by recomputing at most once each node in the

The question seems to be: how to make the input nodes transactional?
I.e. if the pull happens at T0, any changes that happen after T0 do
not affect the value of the output.

The problem is that this information is not completely available;
i.e. the network is not transactional, but there is a definite order
of events (i.e. updates of the file system).

So, let's summarize:

    * SHARING is important: you do not want to update a node multiple
      times, as this can lead to exponential complexity.

    * How do you know if a node is up-to-date?  I.e. an input could
      change during a network computation, and be queried both before
      and after the update.  This suggests you need some kind of
      TRANSACTION or logical time.

I suppose in the `make' utility it is assumed that the inputs do not
change during the evaluation of the network.

So the question seems to be, how can sweb be instrumented to guarantee
glitch-free operation?  In[1] it is suggested to combine

  - push: limited-range invalidation; push invalid only when valid.

  - pull: lazy evaluation.

This requires access to the input events.

[1] http://en.wikipedia.org/wiki/Reactive_programming#Evaluation_models_of_Reactive_Programming