Errors, like straws, upon the surface flow;I am honoured to be the co-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.
He who would search for pearls must dive below.
-- John Dryden
A programming pearl is a short piece of self-contained code of outstanding quality. Ideally it should be clearly correct, elegant, concise, efficient, et cetera, 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 is expected if it can be achieved without sacrificing other qualities.
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.
goto in C because you don't understand while loops
is not a recipe for pearls. Similarly, knowing when to use and not use
cut is a prerequisite for good Prolog programming. A good reference for
Prolog programming is Richard O'Keefe's The Craft of Prolog
published by MIT Press.