A General-Purpose Conjunctive Iterative Control Structure for Prolog
Kanada, Y., not yet published, 1989.
[ 日本語のページ ]
[ Paper PDF file ]
Abstract: A loop-like control structure without using backtracking, or conjunctive iteration, is expressed using recursion in Prolog. However, recursion is too powerful to express an iteration, which needs more restrictive syntax and semantics. This paper presents a general-purpose iteration predicate do. Predicate do enables a programmer to write most iterations, such as arithmetical iterations, append, member, mapcar or reduce, and so on, more easily and in more readable way, in combination with the extended λ term, which is a concept similar to the λ expression in Lisp. Unification and logical variables in Prolog enables some extensive usage of the control structure compared with those of other programming languages, such as Lisp.