24.11.2014 Views

flex Expert System Toolkit - LPIS

flex Expert System Toolkit - LPIS

flex Expert System Toolkit - LPIS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2. Frames and Inheritance 15<br />

So, whenever this rule is fired, the attribute methane_level of the frame<br />

mine is given the current value slight.<br />

Linking Frames<br />

In the previous section we looked at the form and content of frames, which<br />

are structures for representing objects. The frame system, however, provides<br />

more than a data storage mechanism: by allowing objects to be linked to<br />

each other, it enables a frame hierarchy to be established.<br />

The links between frames determine the overall structure of the frame<br />

hierarchy. Each link links a parent-frame to a child-frame. The child-frame<br />

can be thought of as a specialisation of the parent-frame, or, the parentframe<br />

as a generalisation of the child-frame.<br />

A child-frame can inherit values (both default and current) from any of its<br />

parent-frames, which in turn can inherit values from their parent-frames,<br />

and so on. In this way, information filters down from the frames at the top<br />

of the hierarchy to those leaf nodes at the bottom of the hierarchy.<br />

This allows the distribution of information without duplication.<br />

Let us consider a small section of the animal kingdom as below.<br />

Animal<br />

Mammal<br />

Carnivore<br />

Rodent<br />

Feline<br />

An arrow pointing from one frame to another indicates a parent-frame to<br />

child-frame link in the hierarchy.<br />

The KSL frame declarations for the above diagram are as follows:<br />

<strong>flex</strong> toolkit

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!