24.11.2014 Views

flex Expert System Toolkit - LPIS

flex Expert System Toolkit - LPIS

flex Expert System Toolkit - LPIS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2. Frames and Inheritance 18<br />

define the hierarchy such that the meal of sammy is specially inherited from<br />

herbivore and not by normal inheritance from carnivore (via cat and<br />

feline). Note that this only affects the meal attribute.<br />

Carnivore<br />

Feline<br />

Cat<br />

Herbivore<br />

Sylvester<br />

Sammy<br />

Meals<br />

The corresponding KSL code would be:<br />

instance sammy is an instance of cat ;<br />

inherit meal from herbivore .<br />

Note that herbivore is not a parent of sammy: it only contributes the<br />

meal attribute.<br />

Negative Inheritance<br />

In <strong>flex</strong> the inheritance of a particular attribute for a particular frame may be<br />

suppressed.<br />

For example, manx cats do not have tails, if as part of our hierarchy we<br />

have defined the tail attribute in the feline frame. We could define the<br />

manx frame such that the inheritance of the tail attribute is suppressed.<br />

<strong>flex</strong> toolkit

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

Saved successfully!

Ooh no, something went wrong!