next up previous
Next: Port to Pthreads Up: No Title Previous: Parallel Rule-Based System

The Production System Code

Let me explain a little about the code I am giving you. Sample databases are given in the files ``in''. The format of this database is:

Each rule is defined by antecedents and consequents. Each consequent has associated with it a ``+'' or ``-'' symbol. This tells the system to add (+) or remove (-) the associated working memory element. The rule also maintains a dependency list, or a list of processors (rule sets) that are affected by the corresponding change.

Note that there are spaces before and after the parentheses. These are needed to read in the data properly.

The production system continuously fires rules based on the current working memory. If at any time the working memory supports the goal, the system stops and says that the goal is reached. If the goal is not reached but no more unique working memory elements can be added or deleted, the system halts and says the goal cannot be reached.



Diane J. Cook
Tue Jan 28 16:59:24 CST 1997