Contents - Index - Previous - Next


Syntax of rule models

 

There are four types, as described below: 

 

Forward rules

Backward rules

Easy-f rules

Easy-b rules

 

'Easy' type rules are good for novices but at runtime they can only generate Yes/No questions. Forward and backward rules can produce Menu questions which can improve runtime efficiency (i.e. getting to the advice with fewer questions).

 

There are some syntax details that apply to all types of rule model.

 

InterModeller provides a rule editor that can help to ease difficulties with syntax.

 

InterModeller Help Contents

 


Forward rules

 

Syntax: 

 

<IF> conditions <THEN> conclusion <.> 

 

---- where conditions and conclusion use feature syntax

 

Examples:

 

IF    the  colour IS red  AND

the state of the junction IS busy

THEN  the correct action IS to stop at the kerb.

 

IF name = Peter &

time of day = after tea &

today IS a weekday

THEN activity = watching television.

 

Backward rules

 

Syntax: 

 

conclusion <IF> conditions <.> 

 

---- where conditions and conclusion use feature syntax

 

Examples:

 

the correct action IS to stop at the kerb IF

the  colour IS red AND

the state of the junction IS busy.

 

activity = watching television IF

name = Peter &

time of day = after tea &

  today IS a weekday.

 

Easy-f rules

 

Syntax: 

 

<IF> conditions <THEN> conclusion <.> 

 

---- where conditions and conclusion use proposition syntax

 

Examples:

 

IF  you like fish dinners

AND you want a cheap meal

THEN  try eating at the Fry By Night.

 

Easy-b rules

 

Syntax: 

 

conclusion <IF> conditions <.> 

 

---- where conditions and conclusion use proposition syntax.

 

Examples:

 

try eating at the Fry By Night IF

you like fish dinners AND

you want a cheap meal.