Talk about timely, I recently took the opportunity to unmothball the old propagators idea and have been running a bunch of ideas past Sussman&#x27;s former student Alexey Radul on a fairly constant basis for the last 3 weeks.<p>I started a project at <a href="https:&#x2F;&#x2F;github.com&#x2F;ekmett&#x2F;propagators" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ekmett&#x2F;propagators</a>
which at least gets the basic execution of them right, and have been working on a larger project.<p>Now, Sussman and Radul manage propagation and track provenance through using an assumption-based truth management system. This unfortunately results in a 2^n blowup in space, but if you change the schema somewhat you can treat it more like enumerating solutions in SAT, where you get a blowup, but in time not space -- and as usual with SAT &quot;it usually isn&#x27;t that bad&quot;.<p>In any event, a lot of work out there overlaps with the propagators story:<p>Lindsay Kuper&#x27;s work on LVars drops idempotence and doesn&#x27;t deal with &#x27;triggering on change&#x27; but gets a parallel computation with forking and writes to &quot;lattice variables&quot; and uses threshold reads to manage communication.<p>Sussman and Radul&#x27;s work really needs the notion of the propagators themselves being monotone functions between the semilattices that they are working with. Unfortunately in neither the paper or Radul&#x27;s thesis do they ever actually spell that out.<p>Once you do spell it out you get something like Christopher Meiklejohn&#x27;s on LASP. Both he and Lindsay Kuper have been tackling the issue of composing CRDTs lately. Her notion of threshold reads works well here when it can be applied because such functions are automatically monotone, there is nothing to check.<p>On the other hand, we can view things like datalog as a propagator network. You have tables which accumulate information monotonically. You have IDB statements that execute joins between those lattice variables. Now this starts to show some of the differences. There we don&#x27;t bother sending the entire lattice. In seminaive evaluation of datalog we send deltas. So it becomes interesting instead to walk back the notion of a lattice variable and to think instead of a commutative (possibly idempotent) monoid acting on an ordered set. Now your &quot;update language&quot; is the monoid, and we can think of this in terms of firing updates at a set and tracking what makes it through, and propagating _that_. I&#x27;ve been playing with various ways to get a closer analogue to datalog processing and to effectively track these partial triggers.<p>Another issue is that propagator networks as they are currently designed typically do too much work. Too many things are woken up and fired. We can mitigate that somewhat. Consider a propagator that adds two lifted numbers. We can also add a propagator backwards that does the subtraction, etc. This yields a (local) propagator for which if you tell me any 2 of the arguments, I can tell you the third.<p>A more efficient scheme would be to adopt a &quot;two watched literal&quot; scheme like a SAT solver. Pick two lattice variables that are still at _|_. When one of those is written to, check to see if you&#x27;re down to 1 variable not at _|_. If so we have to &quot;wake up the propagator&quot; and have it start listening to all of its inputs. If not disconnect this input and start listening to a different input. For 3 variables this isn&#x27;t a big deal. For a propagator where you can use 499 variables to determine the 500th? You can get some nice zChaff like speadups!<p>We can also use a 2 watched literal scheme to kill a propagator and garbage collect it. If we use a covering relation to talk about &#x27;immediate descendants of a node&#x27; in our lattice, we can look for things covered by our _|_ contradiction node. These are &#x27;maximal&#x27; entries in our lattice. If your input is maximal you&#x27;ll never get another update from that input. So if we take our (+) node as an example, once two of the 3 inputs are maximal this propagator has nothing more to say and can be removed from the network.<p>We can indicate that you don&#x27;t want to say anything &quot;new&quot; to a lattice by adjoining a &quot;frozen&quot; flag. You can think of it as the moral equivalent of saying we&#x27;ll tell you nothing new from here out. This winds up the moral equivalent of Lindsay&#x27;s quiescence detection.<p>Now we can look at a propagator network itself as a lattice in one sense, in terms of adding propagators to the network as increasing information. Then taking the ability to tell the network that it is frozen to give us opportunities to topologically sort the network, in the same fashion as stratified datalog. Now we can be more intelligent about firing our propagators:<p>I can run the network in bottom up topological order, queuing updates from SCCs in parallel. It gets a little tricky if we want the &#x27;warm start&#x27; scheme from 2 watched literals -- you need to make sure you don&#x27;t miss updates if you want to be able to do some more CmRDT-like cases rather than CvRDTs.<p>Finally, there are a lot of problems where we can view a propagator network itself as something useful to implement a propagator.<p>Consider constraint propagation. We can view the classic AC-3 algorithm for enforcing arc consistency as a propagator network. Once it is done _now_ we have arc consistent domains to enumerate with our finite domain solver. Which we can drive in the fashion I mentioned above to avoid the ATMS overhead.<p>On the other hand, a linear programming or mixed integer linear programming solver can also give lattice like answers as you add cutting planes to the model and monotonically increase the information present. In the MILP case we typically loop over these considering relaxations which inform us of new cuts we can make, etc.<p>Both of these are computations that _use_ lattice variables with propagators between them to build a better propagator themselves.<p>They are also nicely both fairly &#x27;convex&#x27; theories. You could run propagators for constraint programming and MILP on the same variables and they can mutually reinforce with nicer guarantees than the dumb (+) propagator that I mentioned.<p>That one runs into issues when you go to do something as simple as y = x + x, and try to run it backwards to get x, because it looks locally to the propagator like 2 unknowns. We could of course try to globally rewrite the propagator network, by adding propagators to work around that, in this case it works if you transform it into 2 * x, and now the 2 is a known as is the y, and you can get to x. Here it is probably better to just borrow tools from the clpqr crowd, but it requires an unfortunate amount of introspection on the propagator network.<p>I have a couple of dozen other sub-domains that fit into this model.<p>I mostly find it interesting how all of these subtly different domains over almost exactly the same tools with minor differences, and how powerful it is to adapt those differences to other problems in the nearby domain.