Logic Programming in Wikipedia
A Call for Help

Robert Kowalski
Imperial College, London
U.K.

Editor: Enrico Pontelli



Interested in learning about logic programming, object-orientation, production systems, the Yale shooting problem, or even the Israeli-Palestinian conflict? Ask Google, and the link to the wikipedia article will be the first link that you get.

If you are a member of the Association for Logic Programming, you are probably not interested in learning about logic programming, and you won’t have asked Google or wikipedia to help you. But there are, no doubt, many others whose first exposure to logic programming, and lasting impression of the field, comes from wikipedia.

 Up until 11 November 2006, these people would have learned in the first paragraph of the wikipedia article on logic programming that:

“Logic programming (sometimes called logical programming) is programming that makes use of pattern-directed invocation of procedures from assertions and goals. John McCarthy [1958] was the first to publish a proposal that mathematical logic be used for programming. The first logic programming language was Planner which featured pattern-directed invocation of procedural plans from both assertions and goals. In order to cope with the very limited memory systems that were available when it was developed, Planner used backtracking control structure so that only one possible computation path had to be stored at a time. Subsequently, Prolog was developed as a simplification of Planner that had pattern-directed invocation only from goals (also based on backtracking).”

Unlike most logic programmers, who regard negation as failure as an essential feature of the field, these people would have learned that:

“However, Prolog did not include the negation or disjunction of mathematical logic because they are difficult to implement. For example if negation were included, the following Prolog program

       not Q.
   Q :- P.

would be unable to prove not P even though it follows by the rules of mathematical logic. This is an illustration of the fact that Prolog is unable to prove many of the logical consequences that follow from a declarative reading of its programs. However, certain dialects do implement negation as failure typically using the characters \+ or ~.”

In the article on negation as failure, they would have learned that:

“Negation as failure is an interpretation of logical negation according to which the negation of a formula is true if and only if the formula cannot be proved true. Negation as failure is used in logic programming languages such as Prolog. Thus in Prolog the compiler holds that the absence of evidence equals evidence for absence.

In logic, the standard interpretation of negation is that the negation of a formula is true if and only if the formula is false. If a formula is neither true nor false, its negation is considered unknown. On the converse, the negation of the formula is considered true according to the interpretation of negation as failure.

The negation used in Prolog is treated as negation as failure by the interpreter. If, during the course of execution of a program, the interpreter has to evaluate NOT a(b), it tries to prove that a(b) is true. If this attempt is unsuccessful, NOT a(b) is considered true.

Negation as failure is related to the common default assumption that what is not known to be true is false. This is known as the Closed World Assumption.

In argumentation, a point for which no argument can be made is called the unfounded argument. An unfounded argument for α is not a founded argument for the negation of α.”

I had been aware of the problems with these articles for more than a year, but didn’t have the nerve to do anything about them, until after 11 November last year when 83.73.190.51 led the way with a significant improvement to the logic programming article. This encouraged me to make my own changes to the article later in December.  

It might have been easier to delete the whole logic programming article and start all over again, but I didn’t feel it would have been right to do so. However, after complaining to one of the wikipedia editors about the state of the negation as failure article and after his posting a request on the article for expert attention, this is exactly what I did for the negation as failure article. I rewrote it completely.

Since then, I have made a number of smaller changes to other wikipedia articles, but there is still a lot more that needs to be done. In my opinion, the logic programming article itself still needs attention. Sections on problem solving and knowledge representation could be added, for example. The section on applications should be absorbed into the new knowledge representation section. And the history section should be given less emphasis, perhaps by moving it to the end of the article.

The article on Prolog, which has always been a much better than the article on logic programming, was once nominated by a user as a candidate “good article”, in part because of its “example-driven style”. It was turned down by an editor in the wikipedia hierarchy for two reasons:

“Firstly, parts of the writing could use improvement. Two phrases in a row in brackets as is the case for, "(especially natural language processing, which it was originally designed for). (The original goal was to provide a tool for computer-illiterate linguists.)", hurts the article's readability.

Secondly, I feel the Data types section is weak. Part of the problem is that readers start to read it without much discussion of what Prolog is but I am also concerned about subsections such as the Numbers one which simply reads, "Most Prolog implementations do not distinguish integers from real numbers. " ”

I agree with the user who nominated the article that the use of examples is good writing style. But although the Prolog article is certainly much better than the earlier logic programming article, it is, in my opinion, still far from a “good article”. I also agree with the editor’s criticisms. But it seems to me that the article is worse than the editor acknowledges.

In my opinion, the whole Prolog article needs to be reorganized. There is an overlap between different sections (as though they were indeed written by different people), and the description of the execution strategy is both incomplete and incorrect. In particular, there isn’t even any mention of backtracking.

There is a problem too about the overlap between the logic programming and Prolog articles. This may be partly to do with the fact that many people (and perhaps some of the contributors to the wikipedia articles) confuse the two. For example, is there such a thing as “pure Prolog”, which is the purely logical subset of Prolog? If so, where should it be described?

There are plenty of problems also with many other related articles. For example, both the “stable model semantics” and “well-founded semantics” articles have requests for expert attention posted on them. The resolution article doesn’t mention that unrestricted resolution is very redundant, and that refinements are needed to eliminate redundancy. Until recently, there wasn’t any article about Alan Robinson, and the resolution article didn’t even mention him.

This short paper is a call for help. The wikipedia articles are too important either to leave them as they are, or for me to edit them on my own. If you want to help, you can edit articles either anonymously (identified only by your network IP address), or under a user name, which is your real name or a pseudonym. I will not be offended if you change anything I have contributed myself.

If you don’t feel confident about making a dramatic change on your own, you can use the discussion page associated with the article, to make a suggestion and see how others react. I propose that we give the wikipedia discussion mechanism a chance, before setting up any alternative mechanisms of our own.

Acknowledgements: Many thanks for helpful comments on an earlier draft to Krysia Broda, Maurice Bruynooghe, Veronica Dahl, Jacinto Davila, Phan Minh Dung, Maarten van Emden, Fariba Sadri, Marek Sergot, and Francesca Toni.