Errors, like straws, upon the surface flow;
He who would search for pearls must dive below.
– John Dryden
I am honoured to be the editor of the Logic Programming Pearls section of the
journal Theory and Practice of Logic Programming. Below are some brief guidelines
for submission of papers to this section. Note that submissions of pearls in logic
programming languages other than Prolog are welcome. Functional programming
language pearls, although similar in spirit, are more appropriately submitted to
another journal such as the Journal of Functional Programming.
A programming pearl is a short piece of self-contained code of outstanding
quality. Ideally it should be clearly correct, elegant, concise, efficient, etc., though in
some cases a (small) subset of these may not apply. It may be a useful application
or may primarily be an example of a useful programming technique. Portability is
not so important in this context, but if it can be achieved without sacrificing other
qualities, so much the better.
Accompanying text explains the code and its qualities. These may be exposed by
describing how a programmer could derive the code. Ideally, a logic programming
pearl should also showcase the logic programming paradigm, for example, declarative
semantics, nondeterminism, logic variables, definite clause grammars, meta
programming, and so forth.
The following classification may help clarify what is considered to be a logic
programming pearl.