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.

7. Knowledge Specification Language 83<br />

Instances<br />

<strong>flex</strong> toolkit<br />

is a kind of.<br />

Examples<br />

frame macintosh is a kind of computer .<br />

frame green_picture is a picture ;<br />

default colour is green .<br />

To specify inheritance of particular attributes, use the keywords<br />

inherit ... from<br />

do not inherit.<br />

Examples<br />

frame wedge is a kind of block , toy ;<br />

do not inherit shape and<br />

inherit volume from block and<br />

inherit density from pyramid, toy .<br />

frame block<br />

default volume is its size to the power of 3 and<br />

default shape is regular ;<br />

inherit usage from toy .<br />

An instance is a particular instance of a frame, differing from the frame<br />

itself in that an instance can have only one parent frame, can have no<br />

children, and all its values are deemed to be current values (so it may not<br />

have default values declared).<br />

Instances may have inheritance declared as for frames.<br />

For instances, use the KSL format<br />

instance Instance is a Frame ;<br />

Attribute is Value .<br />

or<br />

instance Instance is an Frame<br />

instance Instance is a kind of Frame<br />

instance Instance is an instance of Frame<br />

Examples<br />

instance brick7 is an instance of brick ;<br />

shape is cuboid .<br />

instance tweety_pie is a kind of bird ;<br />

habitat is a cage and<br />

predator is tom ;<br />

do not inherit motions .<br />

instance smudge is a cat ;<br />

meal is rabbit .

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

Saved successfully!

Ooh no, something went wrong!