Abstract

In Prolog programs, arguments are often used to exchange information between relations. This kind of communication is tedious when a large amount of information has to be passed around. One way of solving the problem is to add assertions (unit clauses) to the knowledge base in execution time. These assertions are maintained as "global data structures." They are typically managed by the addition and deletion of clauses. However, most of the Prolog implementations offer little support for these operations. In C-Prolog [1], for example, a clause can only be added as the first or last clause of a relation. It would be useful if one could manipulate clauses in the same way as one manipulates lists. For example, sorting the assertions in the working memory of an expert system may lead the problem solver to follow a "better" path in the search space. In many applications, the working memory is build up incrementally. Thus, the insertion sort is a natural sorting method. The sorting may be combined with the addition of assertions using an assertcl(C) relation. A C-Prolog implementation of the articl(C) relation given below.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call