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

2. Frames and Inheritance<br />

In this chapter we describe the frame sub-system of <strong>flex</strong>. This includes the<br />

form and content of individual frames, how frames are linked together to<br />

form a frame hierarchy, and how values are inherited through that<br />

hierarchy.<br />

What is a Frame ?<br />

A frame is similar to an object and is a complex data structure which<br />

provides a useful way of modelling real-world data objects.<br />

Frames are analogous to records within a database but are far more<br />

powerful and expressive. Each individual frame has a name by which it is<br />

referred, details of its parent(s) frame, and a collection of slots or attributes<br />

(similar to fields within records) which will contain values or pointers to<br />

values. Slot values can be explicitly defined locally, or implicitly inherited<br />

from an ancestor frame further up the hierarchy.<br />

Frame<br />

motions<br />

habitat<br />

skin<br />

bird<br />

fly<br />

tree<br />

feather<br />

Name<br />

Slots<br />

Flex has its own language (for representing frames and other constructs)<br />

called the Knowledge Specification Language. For example, the KSL code<br />

for the above frame could be:<br />

frame bird<br />

default skin is feather and<br />

default habitat is a tree and<br />

default motions are { fly } .<br />

<strong>flex</strong> toolkit

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

Saved successfully!

Ooh no, something went wrong!