Sunday 24 November 2019


Triplets are the elemental building blocks of behaviour. A triplet, like a complete system, is physically bipartite: it has a machine and a governed world. In a triplet their interaction evokes a behaviour—the third element—satisfying a simple motivating behavioural [1] requirement. For example, in a system to control entry to an amusement, the motivating requirement for a triplet may be "no visitor enters without paying the admission fee." The developer may design the triplet to evoke a satisfying behaviour—perhaps a strict alternation of acceptFee and admitEntry, the triplet machine interacting alternately with a coin acceptor and a turnstile.

Hoare's aphorism [2] applies with full force to triplets: they should be "... so simple that there are obviously no deficiencies, ... not so complicated that there are no obvious deficiencies." Triplets must satisfy explicit criteria of simplicity, to provide a foundation for reliable behaviour of the whole system. For example, the machine process structure must be simple—typically, regular. The properties of the governed world, described in its model, must hold over the whole duration of the behaviour. The governed world model must be minimal—that is, the only properties described are those needed for the triplet behaviour—and complete, in the sense that the triplet behaviour can be deduced from the models of the machine and the governed world. The triplet thus forms a indivisible unity. The machine and world must be understood together: neither makes sense without the other.

The uncorrupted simplicity of the ideal triplet rarely survives the inevitable incremental complication that follows the first development step to emergence as a fully-fledged constituent behaviour. Requirements beyond the initial motivation may distort the process simplicity: in the amusement entry system it may be desirable to allow a credit balance of acceptFee events, or—even worse—to operate the coin acceptor and turnstile concurrently. Avoiding failure and other concerns may complicate normal behaviour. Combining triplets to form—eventually—the whole system behaviour may introduce further complication to resolve interference and conflict in the physical world.

A triplet behaviour is enacted by executing its machine software. A program can't initiate its own execution, so it must be initiated by an external controlling agent—another program or a human operator. Execution, once begun, is ended only by a programmed halt or by pre-emptive termination by the controlling agent: execution cannot be suspended and later resumed. The development of the control structure within which constituent behaviours are instantiated and enacted in system operation is a major design task in itself.

[1] Axel van Lamsweerde; Requirements Engineering; Wiley, 2009.
[2] C A R Hoare; The Emperor’s Old Clothes; CACM 24,2, February 1981.

Links to other posts:
 ↑ System Behaviour Complexity:  The component structure of system behaviour
 → Triplet Behaviour Concerns    Failures to avoid in triplet behaviour design
 → Triplet Enactment Concerns    Failures to avoid in triplet enactment design

No comments:

Post a Comment