Patterns for Prolog Programming

  • Authors:
  • Leon Sterling

  • Affiliations:
  • -

  • Venue:
  • Computational Logic: Logic Programming and Beyond, Essays in Honour of Robert A. Kowalski, Part I
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

An approach to Prolog programming based on patterns is presented. Two classes of patterns are identified. Skeletons are programs constituting a specific control flow and act as reusable starting components for program development in Prolog. Techniques are standard operations that can be performed on a wide range of skeletons. The result of applying a technique to a skeleton is a new program which performs additional Prolog computations while following the control flow of the skeleton. Both classes of patterns are straightforward to understand and reuse due to the high level of abstraction of logic programming languages. Taking a pattern-directed view makes Prolog programs easier to build, for which some anecdotal evidence is given. In honour of Professor Bob Kowalski, the patterns are traced back where possible to Kowalski's original monograph on logic programming.