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 28<br />

The <strong>flex</strong> system allows the underlying logic to be changed from one<br />

involving unification to one involving inheritance.<br />

That is, although …<br />

tiger does not match shere_khan<br />

human does not match mowgli<br />

with an inheritance logic we can show that …<br />

tiger is an ancestor of shere_khan in the frame hierarchy<br />

human is an ancestor of mowgli in the frame hierarchy<br />

and as such we can conclude that the tiger shere_khan can hunt the<br />

human mowgli. The underlying logic can be changed by issuing the Prolog<br />

command …<br />

?- new_logic( inherit ) .<br />

It should be noted at this point that there is a general overhead involved in<br />

changing from a unification-based logic to an inheritance-based logic. That<br />

is, every procedure invocation will involve data lookup rather than direct<br />

pattern-matching.<br />

It should also be noted that the inheritance-based logic can only be used for<br />

checking given values, and not for generating instances of relationships. For<br />

example, it can check that shere_khan can hunt mowgli, but will not be<br />

able to generate it.<br />

<strong>flex</strong> toolkit

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

Saved successfully!

Ooh no, something went wrong!