Design Pattern CatalogueDesign Pattern Application RulesDesign Pattern Application ExamplesPublications
Design Pattern Application Examples
Consider an example in the figure below, where the patterns from (a) and (b) are combined into the control algorithm in (c). First, a set of behaviours that belong to both patterns is found (Rules C1 and C2). This set includes the behaviours b1 and b2. Next, the data structure di1, that belongs to both patterns, is included and its data type is chosen to be integer (Rules C1 and C3). Finally, all relations that belong to b1, b2 and di1 are copied and combined (Rule C4). Note that the pattern from (b) cannot extend information processing routines defined in (a), since the additional data structure from (b), de1, does not have a read or copy relation with another primitive (Rule EXT1). The point of including a data structure without read operations in a pattern, such as that in (b), is to specify special conditions for their write, send or update relations, that are applicable in cases when the pattern is combined with another pattern, in which the data structure is read or copied.
An example of information processing redefinition is shown in the figure below. Primitives b1, b2 and de1, as well as their relations are copied over (Rules C1–C4). In order to use the design pattern from (a) to redefine information processing described in (b), the write relation between b1 and de1 is deleted, as it represents a shorter relation path (Rule RDF1).
More complex examples are provided in Pitonakova et al. (2018) Information Exchange Design Patterns for Robot Swarm Foraging and Their Application in Robot Control Algorithms.