prologlogic-programming

How is one meant to parse the phrase "pure monotonic Prolog"?


The phrase "pure monotonic Prolog" (sometimes written with a comma) is often used in discussion of the language, especially in discussion of how one ought to write code. How is the phrase meant to be understood?

  1. Is "pure" a modifier of "monotonic"; all your code is monotonic and uses only procedures which "hide" non-monotonic features inside monotonic procedures?
  2. Is "pure" a modifier of "monotonic Prolog"; all your code is monotonic and does not make reference to any non-monotonic language features?
  3. Is "pure" meant adjectivally, and the phrase refers to the intersection of the Venn Diagram of "pure Prolog" and "monotonic Prolog"? If so, in what sense is "pure" meant?
  4. Or is it more of a vibe, and there's no general consensus on the meaning of the phrase?

Solution

  • Your case 3 is the typical interpretation. "Pure Prolog" is one where all rules are Horn clauses, i.e. conjunctions of goals. Pure Prolog programs are a subset of monotonic Prolog programs, which, as you stated, do not use nonmonotonic features like negation. "Pure monotonic Prolog" is the same as pure Prolog, but emphasizes monotonicity as a key design practice.

    Edit: updated answer to highlight that pure Prolog supersedes monotonic Prolog.

    See also: https://en.m.wikipedia.org/wiki/Prolog#Rules_and_facts