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

KSL Formulae<br />

Conditions<br />

The formulae of KSL are used to establish relationships between the objects<br />

of KSL. These fall into two distinct areas.<br />

Conditions test whether or not something is currently true.<br />

Directives change the current state of an object to some new state.<br />

A condition formula is used to test the current state (for example of global<br />

variables, frames or facts).<br />

Conditions either test for the existence of a variant or compare the value of<br />

two expressions; a condition may also be a procedure call.<br />

Equality Comparison<br />

The simplest comparison of two terms is a straightforward equality (or<br />

inequality) test. To test for equality use the arithmetic operator = or the KSL<br />

keywords<br />

is<br />

are<br />

is equal to<br />

Any of these may be used with not.<br />

Examples<br />

alpha = beta / 2<br />

jugA`s contents are jugA`s capacity<br />

the size of some brick is equal to 4<br />

the employee`s name is phil<br />

not alpha = beta<br />

not the pupil`s mark is below 70<br />

X is an elephant<br />

X is a kind of animal whose ears are small<br />

To test for inequality, use the arithmetic operator \=, or the KSL keywords<br />

not equal to<br />

different from.<br />

<strong>flex</strong> toolkit

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

Saved successfully!

Ooh no, something went wrong!