• Keine Ergebnisse gefunden

4.3 A Hybrid Visual Formalism for Activation Engines

4.3.1 Introducing Activation Engines

Let’s call the module that chooses a sequencing element based on a sequence selection algorithm a “Sequencing Engine”. Thus, the internal structure of each composite state can contain either a Sequencing Engine with associated internal sequencing elements, or a directed graph that controls the flow. For example, a

“scene” might be a sequencing element of a generative grammar of story struc-tures. I.e., each scene will be represented as a compound state of the Statechart.

In this example, sequencing elements are composite states, because a scene it-self contains internal structure, i.e., what happens in the scene. The scene might contain further beats, dialogue games, and other structured elements that require a distinct sequence selection algorithm.

Figure 25 – A Sequencing Engine is attached to a compound; in this example, the engine S1 is at-tached to compound S1. The sequencing elements are located inside the compound. A sequencing element might be itself a compound, containing further Sequencing Engines.

This internal structure can then be represented in the same way as a set of se-quencing elements of an inferior level with a corresponding sequence selection algorithm (or as a directed graph, cf. below). Thus, the basic visual representation for arbitrary sequence selection algorithms will consist of a hierarchy of

sequenc-ing elements, and to each sequencsequenc-ing element that contains an internal structure a Sequencing Engine can be attached. Figure 25 depicts this structure. Thus, arbi-trary sequence selection strategies can be combined within the same formalism, including with a partial flow control by a directed graph (

Figure 26).

Figure 26 – A Sequencing Engine can also be combined with the directed graph of the Statechart. The semantics is defined by a delegation pattern.

Formally, the additional structural elements are a set of Sequencing Engines, , and a set of Fallback Engines, , with

,

and .

Each sequencing and Fallback Engine is associated to a unique compound . Thus, these engines belong to a unique triple

.

θ Ξ

} ,..., {mi mj θ =

} ,..., {fi fj

= Ξ

S

>

< fi,mj,Sk

Composite state A Composite state B

C

D

Composite state E

F G

H

Composite state I

J K

Sequencing Engine S1

Sequencing Engine S2 Sequencing Engine S3 Sequencing Engine S4

The association of compound and engines is assured by attaching meta-data to the compound.

A Sequencing Engine can activate a state when , and when car-ries appropriate meta-data. Transitions may also carry meta-data.

Now, it will be shown how a combination of both directed graphs and Sequencing Engines within a compound can be employed. I.e., the next step consists in com-bining Sequencing Engines and the Statechart. A consistent semantics (or at least a semantic not less consistent than Statecharts12) can be achieved by introducing a delegation chain for the Sequencing Engine and the transition network (i.e., Sta-techart). The term “delegation” is employed from the point of view of the directed graph, which delegates the choice of the next scene to another module.

Figure 27 – The left states carries meta-data for a Sequencing Engine. This is indicated by the short arrow on top. This symbolizes that the state can be activated without traversal of a transition. When a transition carries meta-data (right side), the arrow is employed by analogy.

When representing a state that contains meta-data that can be read by an Activa-tion Engine, a short arrow on top of the state will be employed from now on (cf.

Figure 27). Transitions are also allowed to carry meta-data to be read by the Se-quencing Engine. This allows providing the SeSe-quencing Engines with additional structural information, e.g. meta-data attached to a transition can express that the source must have been activated before the sink can be activated. By analogy, the visual representation of such transitions also carries an additional short arrow on top (Figure 27).

12 Some semantic problems of Statecharts are known, under distinct conditions; they are discussed in the literature, and are not subject of this work. Cf. [vonderBeek]

mj σ σ ⊂Sk σ

Figure 28 shows a simple example where the scenes are controlled by a dedicat-ed Sequencing Engine for scenes (SceneEngine), and the beats by BeatEngines.

The internal structures of the beats are directed graphs.

Figure 28 – The Hybrid Control Formalism allows for combinations of sequence selection algorithms with directed graph control. In this example, the scenes are the direct daughters of the top most com-pound, which selects the scene-compounds with the aid of the SceneEngine for sequence selection.

The scenes contain a further hierarchy controlled by a Sequencing Engine, the BeatEngine. The daughters of this level are beats. In this example, the beats themselves contain a structure controlled solely by a directed graph.

Figure 29 illustrates the migration process from the directed graph to the partial control by Sequencing Engines. It is assumed here that, at the beginning of the wicked creation process, the algorithms and requirements for sequence selection were not known, and therefore the first creation step employed only the directed graph.

In order to avoid ambiguities, when the directed graph of the Statechart is em-ployed to determine the subsequent state, it will be assumed that a “Directed Graph Engine”, or simply “Graph Engine”, is activating the state. Let’s “Activation

S: BeatEngine 1

S: SceneEngine

S: BeatEngine 3

S: BeatEngine 2

S: BeatEngine 2

S: BeatEngine 1 S: BeatEngine 3

S: BeatEngine 2

S: BeatEngine 1 S: BeatEngine 3

Engine” be a term that covers both Sequencing Engines and the Graph Engine.

I.e., an Activation Engine is either a Sequencing Engine or the engine of the Sta-techart proper, and a Sequencing Engine is an engine that actives a state of the formalism, but independently of the graph; a Sequencing Engine does not ex-amine the transitions, but works on facultative meta-data of states and of transi-tions.

Figure 29 – On the top, a preliminary step during prototyping and experimentation. In the middle, an advanced development stage is shown, where part of the transitions were replaced by a Sequencing Engine and metadata. At the bottom, a succeeding development phase where a new grouping was found. The dotted lines show identical states, in the different stages and representations.