This module contains predicates for removing completes and related memo_table data from analysis necessary for recomputing correctly analysis after removing clauses or modifying the answers of the analysis.
We erase from the analysis database all the clauses for the predicates in the list Preds.
Cls is a set of clauses which has have been eliminated from the program. Thus, they must be deleted from the database of clauses used by the analyzer. In addition to the clause, we delete all the memo_tables and memo_lubs for the clauses. In Preds and Keys we collect the name,arity and keys of predicates for which clauses have been deleted. This will later be used for updating the SCCs.
This predicate traverses Body and removes the existing memo_lubs. When Body is finished, we also remove the memo-lub for the end of the clause using Clid.
Keys is the list of keys of predicates for which clauses have been deleted. The completes for such predicates may no longer be accurate enough. Thus we collect them in Completes and erase the corresponding completes from the analysis database.
The memo_tables and parents information for the clause Body with key Clid which correspond to the complete Id are erased. Key1 is the key of the first literal in Body. The difference with erase_memo_tables_and_parents is that it only deletes the memo_tables and parents that correspond to one complete (Id) instead of to all the completes for the predicate.