Talk:Chart uncertainties

From PublicWiki
Revision as of 04:49, 21 December 2005 by Jack (talk | contribs) (the state problem)

Jump to: navigation, search

?? How do you accumulate transparently when a node's execution is split? ??

Yeah, weird wording. It's been sitting there a while, so I'm not as sure anymore, but: when you have a program expressed as nicely as in Sawzall, how, in general, do you accumulate the responses to an earlier node for passing to a later one, without problems? This is certainly a matter of inserting another node, I suppose...

Which seems equivalent to the problem of maintaining state as well as the recursion question (which I already wrote some on). I currently am of the belief that a node must be let free to only output on some of its channels. It cannot output on any channel not mentioned in the chart, but is free to output on any of its described channels. This comes one step closer to multiple 'emit' calls compared to a single return but this does seem to solve the state/recursion problem.

As per your specific question of an accumulator node:

(goose, accum : accum, geese) accumulator

Where accumulator takes in a 'goose' and an accumulated pile of geese and can output a set of 'geese' or feedback into itself with the 'accum' channel. The problem here is initializing the 'accum' channel which cannot be done without some other node intervening. The data node could pass along an initializing state, but without it having some method to accumulate state it would always send an initializing state with its data. This is wrong.

This problem could be stated such as needing the ability to accumulate state to be able to accumulate data. How do we accumulate state? Clearly not in the same way that we accumulate data as we have not solved that problem yet. Either some node must initialize all states at the start of the chart, each node must specify some default initial input, or a way must be specified for nodes to run with partial inputs. The third feels most powerful and dangerous given that our current setup allows for nodes inputs to be filled from multiple nodes.