A Guide to the Flex Expert System Toolkit

The Flex Example Suite

The examples provided with the flex system have been reviewed, revised, added to and commented, to enable an easier path to learning the flex expert system toolkit. The following table extends the flex construct overview to include, where appropriate, some flex examples that illustrate the use and programming of the construct. Flex keywords are shown in bold.

Level

Constructs

Examples

Fundamental

frames and instances

ANIMAL.KSL, ROBBIE.KSL

 

backward-chaining

relations and actions

SOLVENT.KSL, YIELD.KSL, SPECIES.KSL, TIMTABLE.KSL
TREE.KSL

 

questions

QUESTION.KSL, SPECIES.KSL, ROBBIE.KSL
TREE.KSL

 

forward-chaining

rules and rulesets

TIMTABLE.KSL, WATER.KSL, ROBBIE.KSL, BLOCKS.KSL

 

groups

QUESTION.KSL, ROBBIE.KSL, WATER.KSL
TREE.KSL

 

explanations

questions and rules

QUESTION.KSL, WATER.KSL

 

global variables

YIELD.KSL

 

logical variables

YIELD.KSL

 

storing and removing facts

remember and forget

BLOCKS.KSL, TIMTABLE.KSL

 

 

Level

Constructs

Examples

 

Intermediate

templates

YIELD.KSL

 

synonyms

ROBBIE.KSL

 

data-driven programming

launches, demons, constraints and watchdogs

ROBBIE.KSL,

 

compiler directives

do

QUESTION.KSL

 

data setup

data

ANIMAL.KSL

 

multiple inheritance

ANIMAL.KSL

 

sets

 
 

program control

if-then-else, repeat-until, while-do, for loops

FUNCTION.KSL, ANIMAL.KSL,

 

user-defined questions

QUESTION.KSL

 

de-referencing

QUESTION.KSL

Advanced

flex support predicates

ANIMAL.KSL

 

user-defined ruleset agenda updates

 
 

functions

FUNCTION.KSL

 

attribute chaining

ADDRESS.KSL

 

inherited logic