APPENDIX H

 

CLIPS Pseudo Rules

 

Initialization Anomaly

The treatment of the initialization anomaly is performed by the following rule:

 

IF there is a set of global objects that are initialized at declaration time AND

these objects are referenced by a set of tasks AND

no syncronization is used to enforce that the reference to these objects occur only after the body frame of the ancestor task is ready for execution

THEN

report the occurence of the initialization anomaly, for each task, toguether with instructions to delay the reference to these global variables until the body frame of the ancestor task signals to its dependent tasks to proceed

 

Update Anomaly

The treatment of the update anomaly is achieved by two rules. The first rule deals with the issue of concurrent update of a global object by dependent tasks. The second rule deals with the update of a global object, by a dependent tasks, and the retrieval of its final value by an ancestor task. The next rule deals with the first case.

 

IF a write operation is performed by a set of more than one dependent task, over a global object,

AND mutual exclusion is not enforced

THEN

report the occurence of the update anomaly and instruct the user on how to correctly enforce mutual exclusion

 

The next rule deals with the second case of the update anomaly.

 

IF a dependent task performs a write operation over a global object whose value is retrieved by

its ancestor task

THEN

report the occurence of the update anomaly and instruct the user on how to delay the retrieval of the global's object value, by the ancestor task, until the dependent task has completed the update operation

 

Circular Entry Call Anomaly

The detection of a circular entry call deadlock may use two basic rules. The first rule is used when there are more than two tasks in a entry call loop:

 

IF task A calls task B AND task B calls task C

THEN

remove these two calls and create a call from task A to task C

 

 

This is the transitivity rule. This rule is used to reduce the number of calls to two, the initial task in the chain calling the final task and vice versa. The second rule is used to detect the circular entry call deadlock:

 

IF task A calls task C AND task C calls task A

THEN

there is a circular entry call deadlock that starts with task A