Designing an Application: Three Axes of Variability

2. Three Axes of Variability

The three axes of Variability

The three axes of Variability

The hot spots are mainly structured based on two criteria (Table 1):

  • Specificity. Two levels of specificity are identified: the first gathers the general hot spots related to the case base reasoning and the second gathers the additional or specialised hot spots, necessary for the indexing by behavioural situations.
  • Axes of variability. An axis of variability defines a dimension in which the various applications require flexibility and are likely to vary. Three axes of variability were identified, each containing a set of hot spots: management of the reasoning, representation of the cases and organisation of the memory.
Axes of Variability/
Hot Spots
Reasoning
(Management
of the
reasoning)
Case
(Representation
of the
cases)
Memory
(Organisation
of the
memory)
Total
CBR level
11 4 11 26
Level «indexing by
behavioural situations»
(1) 10 (1) 2 (1) 12
Total
11 14 13 38

Table 1: structuring and enumeration of the hot spots

The hot spots entered between brackets correspond to hot spots which replace hot spots of the level "CBR" (it is the case for TimeExtendedReasonerFactory, TimeExtendedCase and TimeExtendedMemory, which replace ReasonerFactory, CbrCase and Memory respectively). Thus, they are not additional hot spots and are not entered in the total of the hot spots of the framework.

To represent this structuring, we use the formalism of the use-cases. A use-case represents a type of interaction between a user (the designer of an application) and a system (formed by the supplemented framework of its environment: graphic or textual editor for example). In this context, a use-case represents a task which must carry out the designer to build an application. This formalism was selected because it enables us to represent in a simple way, not only the links between the two levels of hot spots, but also the decomposition in axes of variability.


2.1.Management of the Reasoning

2.1.1.Core Level

Figure 1: eleven hot spots for the management of the reasoning

Figure 1: eleven hot spots for the management of the reasoning

The first axis of the variability represents the management of the reasoning: it covers the global control of the reasoning as well as well as the definition of the various phases (Figure 1). First of all, although the various phases of the reasoning are often carried out in a sequential way (retrieve, re-use, revise and finally retain) other types of management of the reasoning could be necessary (hot spot Reasoner). For instance, the failure of the phase of re-use may lead to the execution of a new phase of Retrieve. Moreover, the reasoning cannot proceed to a draft. In effect, the phases of Revision or Retain may need data from the real world (execution of a solution, explanation of a failure by experts), which are not immediately available. However, the system should be capable in the meantime, to continue the reasoning on other problems. The reasoning can then be suspended and after that recovered thanks to the backup of its state (hot spot Reasoning). Finally, the Case-based Reasoning does not propose a single method for retrieve, re-use, revise and retain.

Various techniques must be installed in-place following particularly the knowledge of a domain and the degree of the automisation desired for reasoning (hot spots Retrieve, Re-use, Revise and Retain). In order to function, these phases use the results of the previously executed phases for the same reasoning (hot spots RetrieveResult, ReuseResult, ReviseResult and RetainResult). Finally, the management of the reasoning requires the creation of a set of objects (target case, object for backup of the state of the reasoning), which is necessary to parameterise (hot spot ReasonerFactory).


2.1.2.Time Level

Figure 2: replacement of the hot spot ReasonerFactory

Figure 2: replacement of the hot spot ReasonerFactory

For the indexing by behavioural situations , the management of the reasoning is based on the hot spots already presented. In effect, the use of the principles for management of the reasoning is based on the general hot spots (in particular Retrieve, Reuse, and Retain). The configuration and the initiation of the retrieve strategy are carried out with the hot spot Retrieve. The result of the mapping between the source case and the target case is recovered by using the hot spots RetrieveResult and Reasoning. The phase of re-use can then carry out the actions of adaptation of the solutions through the hot spot Reuse. Lastly, the phase of retain carries out one or more actions among the four types of actions proposed, with the hot spot Retain. However, the reasoning management should allow the selection and the creation of the new elements introduced into the other axes (base of registrations and base for tne patterns of potential cases for the organisation of the memory). This is why the hot spot ReasonerFactory is replaced by the hot spot TimeExtendedReasonerFactory (Figure 2).


2.2.Representation of the Cases

2.2.1.Core Level

Figure 3: four hot spots for the representation of the cases

Figure 3: four hot spots for the representation of the cases

The second axis of variability is based on the representation of the cases and their indices . The task of representation of the cases comprises a significant sub-task corresponding to the representation of the indices (Figure 3). The general representation of a case (hot spot CbrCase) includes the description of the solution, the data of the management, as well as the access to the indices. The representation of the indices is generally linear, however a structuring is often necessary in the complex fields and depends on the modeling of the field and the use of the indices during the reasoning (hot spot CompoundIndice). The indices can be defined on many domains of values (hot spot IndiceType), for instance the integers, real numbers, or characters and with various properties (ordered and/or countable domain for example). Lastly, each index can have a weight of importance giving its degree of relevance in comparison with the other indices. The assignment and the calculation of these weights can be done according to various methods (hot spot WeightVector): use of weight per defect, manual assignment by the user, or dynamic calculation of the weights.


2.2.2.Time Level

Figure 4: hot spots for the representation of the cases with behavioural indices

Figure 4: hot spots for the representation of the cases with behavioural indices

Within the framework of this model of indexing, the axis of variability for the representation of the cases covers the representation of the recordings (data for observation) and the representation of the cases itself (Figure 4). The recordings (hot spot Record) are composed of a set of chronicles and a context to be defined according to the application considered. The chronicles used can be sampled with events, and their structural domains (integers, real numbers, character string or others) and temporal domains (day, month, year for example) which are equally variable (hot spot TimeSeries). By implication, the management of one instant of reference within a recording, which will be used to express a bahavioural situation, must be adapted to this representation (hot spot Cursor).

The representation of the cases includes the representation of the patterns of potential cases, and the concrete cases. A pattern of potential cases must establish two operations (hot spot PotentialCaseTemplate): the predicate of applicability (applicableP) and the function of instantiation (newP). Moreover, for a better effectiveness, the algorithm of the series of the recordings, used to instantiate a patron, should be designed according to the predicate of applicability and specific properties of the chronicles (hot spot CursorEnumeration).

For the patterns of potential cases like for the concrete cases, it is necessary to represent the parts "solution" and "problem" of a case. The representation of the solution is specific to the task of the system (hot spot TimeExtendedCase) . The general hot spot (CbrCase) was replaced to allow the expression of this solution, while integrating by default the particular information: type of case (concrete or potential) and use of a behavioural situation.

The problem part of the cases is based on the representation of a bahavioural situation, which includes instantaneous indices (hot spot InstantaneousSituation) and behavioural indices. The expression of the bahavioural indices specialises the general task of representation of the indices. The behavioural component should manage the various functional interfaces (consultation, analysis, selection and modification). These interfaces should take into account the particular structure considered to provide effective and adapted operations (hot spot BehaviouralSituation). The behavioural component is expressed in elementary terms of behaviours and temporal constraints. The elementary behaviours must be adapted to the types of subjacent chronicles (hot spot RelevantSequence). There was introduced a certain type of basic temporal constraints (relations of Allen) and other types can also be definited (numerical constraints for example, fro which the hot spot IntervalConstraint). The elementary behaviours are based on constraints of localisation (hot spot SequenceLocation), whose four basic types were defined: localisation by position, by time passed, by value and by reference.


2.3.Organisation of the Memory

2.3.1.Core Level

Figure 5: eleven hot spots for the organisation of the memory at 'core' level

Figure 5: eleven hot spots for the organisation of the memory at "core" level

The third axis represents the organisation of the memory, which contains the source cases and organises them according to structures of data. We can notice first of all that the organisation of the memory should be used, on the one hand with storage and the consultation of the cases, and on the other hand with the retrieve of the useful cases for the reasoning. It is thus proposed to break up the realisation of the organisation of the memory into two principal sub-tasks: the organisation of the cases and the organisation of the indexing. The memory (hot spot Memory) manages the coherence of these two organisations. The organisation of the cases covers the study with the physical storage of the cases in various bases resulting from the information systems used (and the cycle of life in which they can be created, recorded, be validated by experts or finally removed from the memory (hot spot CaseBase).

The organisation of the indexing aims at defining indices, which will allow to find the cases at the time of the phase of retrieve of the reasoning and which can also be updated at the time of the retain. Various indices are usually used (hot spot Index): linear organisation, discriminating tree built a priori or by induction. Moreover, it is necessary to be able to make evolve these indices during the life-cycle of the system, in order to include new knowledge, or to deal with the growing number of the cases added in memory. It is therefore necessary to define simultaneously several strategies of indexing to evaluate them and to make them evolve (hot spot IndexBase). Lastly, the indices can take into account only part of the indices of the cases (hot spot IndiceFilter) and return various types of information (hot spot IndexResult): set of case, set of prototypes and detailed analysis of the indices.

These various indices use particular measurements of similarity (hot spot Similarity) allowing to compare the source cases with the target case. These measurements return evaluations (hot spot CmpValue), which can be of various types: generally a factor between 0 and 1, or 0 and 100 or even a pair possibility/necessity. These results are then ordered according to an associated relation of command (hot spot CmpValueOrder). Lastly, these measurements are based on various elementary functions of similarity and functions of aggregation (hot spots ValueSimilarityFct and AggregationFct), which must be defined according to the knowledge of the field, the semantics of the indices and their domain of values.

2.3.2.Time Level

Figure 6: organisation of the memory at 'time' level

Figure 6: organisation of the memory at "time" level

The organisation of the memory is based mainly on the already specified hot spots. The implementation of the principles of management for the phase of retrieve requires a particular organisation of the indexing, which is carried out with the existing hot spots (in particular Index and IndexResult). The organisation of the cases is not anymore specific to the indexing by behavioural situations. In contrast, the general organisation of the memory integrates two new components to manage and organise the set of the patterns (hot spot TemplateBase) and recordings (hot spot RecordBase). It concludes from it that the existing hot spot (Memory) managing the overall memory is replaced (hot spot TimeExtendedMemory).