Talk:The Waterfall Model

Minsky machine construction
Expanding on your last section, I think that a Minsky machine implementation only needs:


 * 1 clock per counter
 * Normal values in 2-increment steps starting at 2.
 * 2 clocks per conditional decrement state (one for failing and one for succeeding decrement).
 * Failure clocks have default value 3, and success clocks default value 2.

In addition, an optional clock can be used for each state for ease of programming - these do only actions that can be inlined into their pre-triggering clocks. Default value 2.

The below uses both of the "adjustments can be negative" and "clocks trigger immediately when their value becomes the minimal one" conventions, which I find easier to think about since it allows keeping untouched clock values stable.

Triggers

 * Counter clock: Add 2 to self, subtract 2 from all failure clocks (bringing them to 1, except the one for the current state which becomes 0.)
 * Failure clock: Add 3 to self, 1 to the same state's success clock, 2 to all other failure clocks, subtract 2 from appropriate following state clock (or inline its trigger).
 * Success clock (triggers at value 1): Add 1 to self and to the same state's failure clock, subtract 2 from appropriate following state clock (or inline its trigger).
 * Incrementing (or otherwise unconditional) state clock: Adjust appropriate counter clocks, add 2 to self, subtract 2 from next state clock. (Optional, can be inlined.)
 * Conditional decrement state clock: Subtract 2 from counter and 1 from this state's failure and success clocks, add 2 to self. (Optional, can be inlined.)

In the case where a counter has only one conditional decrement state, that state's failure clock can be inlined into the counter's trigger, essentially reducing to the construction you already gave. --Ørjan (talk) 05:53, 5 March 2018 (UTC)

Initial clock
The "waterclocks must not start with 0 as their current value" rule makes no sense. What you really need is for the minimal starting value to be unique, but then it may just as well be 0. --Ørjan (talk) 21:56, 11 March 2018 (UTC)
 * Never mind, I realized after waking up that it's for implementations that start out by decrementing all the clocks. I still think it's an inelegant restriction, though. --Ørjan (talk) 12:46, 12 March 2018 (UTC)
 * Right, this is intended to be as easy to implement as possible, so adding restrictions that can help implementations can only be helpful. (You could change the input encoding by incrementing the initial clocks, but that seems even less elegant.) --ais523 00:11, 13 March 2018 (UTC)