Stop Action

The stop action may be used to optimize rules written in a section. Execution of a stop action indicates that no more actions are to be executed or boolean expressions to be evaluated in the containing section. The stop action helps the knowledge engineer to avoid repeating complicated conditions.

The syntax for stop is simply:

<stop> ::= stop

Examples

A simple example using stop:

section start 'a section without any action'

stop

advice 'This advice will never be given due to the stop action'

An example showing two sections, one with stop and one without, which operate identically:

section start1 'start section without stop'

if p1 and p2 and p3 and p4 and p5 and p6 and p7

advice 'realizing that p1 - p7 is true , this advice is given'

if not (p1 and p2 and p3 and p4 and p5 and p6 and p7)

advice 'this second advice is given since one of p1 - p7 was false'

section start2 'start section with stop'

if p1 and p2 and p3 and p4 and p5 and p6 and p7

(advice 'realizing that p1 - p7 is true , this advice is given',

stop)

advice 'this second advice is given since one of p1 - p7 was false'