Although SDF is adequate for representing large parts of systems it is rarely enough for representing an entire program. A more general model is needed to represent data-dependent iteration, conditionals and recursion. We can generalize synchronous dataflow to allow conditional, data-dependent execution and still use the balance equations. Boolean Dataflow Networks (BDF) is an extension of Synchronous Dataflow that allows conditional token consumption and production.
By adding two simple control actors like switch and select we can build conditional constructs like if-then-else and do-while loops. The switch actor gets a control token and then copies a token from the input to the appropriate output, determined by the boolean value of the control token. The select actor gets a control token and then copies a token from the appropriate input, determined by the boolean value of the control token, to the output. These actors are not SDF because the number of produced/consumed tokens is not fixed and depends on an input boolean control [Buck and Lee, 1994].