• No results found

At this point, we have introduced MDA and the application of traceability within M2M transformation, a key element within MDA. Traceability comes in many forms with differing levels of detail dependent on the requirements of the engine.

In the event of a big transformation, we will need to reduce the effects traceability has to increase the throughput of the process itself. However, smaller input models allow us to retain more associations with the target model. This process is, of course, assuming that the transformation trace is available to the user at all.

The next step is to learn from previous experience. To do this, we look at how we as humans recognise objects. For example, assuming we have no previous knowledge, and we were provided with a stool. To begin with, we would break it down into its components and learn its use. We might note that it has four legs and a flat surface for sitting on. Then we would store this information. If after this we were then provided with a chair, we would recognise the flat surface and the four legs. However, we would have a new component the back of the chair.

We would then have to investigate what this was to learn its purpose and in turn remember it in a knowledge base. Humans, however, do not just remember good stimuli but the bad too. So if the chair had a spike, then they would remember this to avoid it!

In this section, we shall look at how we as humans recognise objects to know quality transformations based on their transformation trace.

An essential requirement of our work, once we have a transformation trace, is the comparison of trace elements such that we “recognise” sub-components of our new trace in respect to the older model transformations. Berry (2014)

describes mechanisms that we use in computer science to mimic our understanding of recognising objects. Specifically, there are four approaches of interest: template matching, prototype matching, feature analysis and recognition by components.

2.4.1 Template Matching

Template matching is a normalised cross-correlation between a known and a new image to classify. These known images create a long term memory, or knowledge base, of elements that have been seen before to represent the processes’ experience and learning. A direct comparison between the new input and each of the templates provides a match. This type of comparison has a drawback as they need to be identical, preventing the recognition of variations unless those too are within the knowledge base.

2.4.2 Prototype Matching

Prototype matching extends template matching by using a prototype that defines the characteristics of the object in question. For instance, the concept of a vehicle with two wheels and a chain is a prototype for a bicycle or a motorcycle. We can extend this prototype to include an engine to represent the latter of the two.

Unlike template matching, this method allows for variations between input models and those in the knowledge base. This method provides us with a probable match within a hierarchy of prototypes.

2.4.3 Feature Analysis

This approach contains four main components: detection, pattern dissection, comparison and recognition. In essence, sensory information is broken down and compared with known features, partial or otherwise for a match. The process generalises the input information and breaks it down into components. For example, if we were received visual information that contained a dog, we might break it down into a body, four legs, a head and a tail. We would then look into our knowledge base looking for “things” with these traits. Naturally, using only these traits there are a plethora of false-positives, in fact, most four legged invertebrates with tails!

This approach closely mimics the model-snippets Oracle when validating M2M transformations, as discussed in Section 2.3.2. Model-snippets involves breaking down the resultant model of an M2M transformation and comparing sub-models to known models. If all sub-models are present, then the test case is deemed successful.

Detection and Dissection To summarise, the first component looks at receiving and dissecting relevant information from an input. We have already mentioned how we as humans can use feature analysis to look for a dog from visual stimuli. This process can differ between domains and look for different traits. If we were to attempt to recognise components within a scanned image, we’d use pixel intensities as our “visual sensory” information. Then we’d dissect the input to find lines, arcs and other interesting vectors. Another example is in facial recognition.

We would attempt to detect dominant, or cardinal points, related to facial fiducial points, the eyes, chin, cheeks, mouth, etc. (Wang et al. 2017).

Comparison and Recognition The next step is to find a match given a set of features. This process involves comparing the input features to those of instances that we have seen previously. Continuing our detection and dissection of vectors, we could recognise components from various diagrams. In circuitry, if for example, we had the knowledge that a lamp is a circle with two perpendicular lines crossing inside, we can compare permutations of features to see if we can recognise this configuration regarding the input. Likewise, the knowledge that two parallel lines where one is shorter and bolder than the other can aid in distinguishing a cell. We can use similar heuristics to find components within chemical diagrams given the previous experience. Two parallel lines where one is shorter than the other could denote a double bond. Characters indicate the location of atoms and their types. The lack of a character at a junction of two bonds suggests an implicit carbon atom.

In the case of facial recognition, we would have spatial information of the five traits discussed above for each face in the knowledge base, as well as the original photo. Comparing the input to each object could aid in identifying people. This type of comparison would not be as clean cut as others.

2.4.4 Recognition by Components

Recognition-by-components specialises feature detection but rather than looking at labelled features; we instead look at three-dimensional geometric shapes called Geons. Thus the features are not labelled in the sense of a body; we might say an ellipsoid instead. Geons better describe and can be more telling on what we are viewing. A feature detector is then used to find these primitives. For example,

rectangles, squares and circles in two-dimensional space, but also cuboids, cubes and spheres in three-dimensional space. A match comes from comparing the combination and orientation of these geometric shapes with images found within a knowledge base. Using the example of a dog, the geons of a dog’s head and that of a cat’s head can distinguish the two animals whereas a “head” like object cannot.

The theory by Biederman (1987), suggests that there are fewer than 36 geons, which, in combination, make up the objects seen in life. For instance, we might decompose a cup into two cylindrical-components. The first makes up the main body and the second for the handle. However, these two components would also be present in many other objects. A bucket, for example, may also be composed of the same cylindrical-components only the configuration would differ such that the handle would be on the flat end of the body opposed to being attached to the side.

Using our dog example, geons are not labelled in the sense of a body; we might say an ellipsoid instead. Geons better describe and can be more telling on what we are viewing. The geons of a dog’s head and that of a cat’s head can distinguish the two animals whereas a “head” cannot.