A clause is deleted from all indices when it is moved to the set Inactive by back subsumption in Task C or by back demodulation in Task D. The two main problems with deletions are (1) to keep the indices well-formed so that other processes can access them during deletions, and (2) to ensure that the overall algorithm is correct with respect to deletions.
The problem of maintaining well-formed data structures is more
difficult for deletions than for insertions, because dangling
references must be prevented. As with insertions, we can restrict the
discussion to doubly linked lists. Consider the deletion of node Xfrom the list
[A,B,X,C,D]. See Figure ??.
To show that the overall algorithm is correct with respect to deletions, we show that if the database is in a stable state, then no clause subsumes any other clause and no clause can be demodulated by any demodulator.
Consider a time at which all processes are executing Task A. The data base is in a stable state, because no updates are occurring. To see that no clause (ignoring the set Inactive) subsumed any other clause, assume, by way of contradiction, that clause Qx subsumes clause Qa. Clause Qx must have entered the data base after Qa and be strictly more general than Qa; otherwise, Qx would have been forward subsumed by Qa. Therefore, Qa must have been inserted into All-index before Task C starts back subsumption with Qx. Therefore, back subsumption with Qx finds and deletes Qa.
The argument for demodulation is similar to that for subsumption.
Deletions delayed by parallelism can, however, cause redundancy in inference of clauses by Task A. A clause that would have been back demodulated or back subsumed in a sequential execution can be present and be used to complete an inference in an analogous parallel execution, because the new demodulator is enqueued for Task D or the subsuming clause is enqueued for Task C.