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

Frames<br />

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

There are three parts to the definition of a frame:<br />

1. The first part of a frame specifies whereabouts in the hierarchy of frames it<br />

exists, by specifying its parent frames (if any). The frame hierarchy<br />

determines how attributes are inherited.<br />

2. The second part of a frame is optional and specifies what the default<br />

attributes of a frame are. The defaults remain throughout the life-span of the<br />

frame, and are used in the absence of any current value being assigned.<br />

3. The third and final part to a frame is also optional and represents a<br />

refinement of the inheritance hierarchy. Alternative parent frames can be<br />

nominated for the inheritance of specific attributes, or specific attributes may<br />

be declared not to be inherited.<br />

The general format of a frame is as follows.<br />

frame Name<br />

default Attribute1 is Value ;<br />

inherit Attribute2 from Frame .<br />

The simplest example of a frame is a declaration of the frame’s name only.<br />

Example<br />

frame toy .<br />

To this may be added some default values for its slots.<br />

Examples<br />

frame picture<br />

default colour is red and<br />

default shape is oval and<br />

default pen_size is thin and<br />

default link is arrow.<br />

frame text_spec<br />

default size is 12 and<br />

default font is 'Courier' and<br />

default style is normal.<br />

frame computer<br />

default memory is 24 and<br />

default disk is 500 and<br />

default accessories are<br />

{ monitor and keyboard and mouse } and<br />

default speed is 66.<br />

To specify the parents of a frame, use the keywords<br />

is a

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

Saved successfully!

Ooh no, something went wrong!