Did you know ... Search Documentation:
Packs (add-ons) for SWI-Prolog

Package "purity"

Title:A Horn Clause Only library for Prolog
Rating:Not rated. Create the first rating!
Latest version:0.2.1
SHA1 sum:16953fc3d470109e9786aa6fef7ae4a3719cfd89
Author:Neil Hoskins https://buslogic.pro
Maintainer:Neil Hoskins https://buslogic.pro
Packager:Neil Hoskins https://buslogic.pro
Home page:https://github.com/da-poodle/purity
Download URL:https://github.com/da-poodle/purity/releases/*.git


No reviews. Create the first review!.

Details by download location



A Horn Clause only library for Prolog.

For more detailed documentation and API reference see: https://buslogic.pro/content/purity


Prolog was designed with a minimal set of operations and structures in mind, the following is all you need to make up any Turing Complete program:

  • Atoms:
    • a
    • 12
    • 'Hello, World'
  • Compound terms
    • a(b)
    • person('Fred', age(23), gender(male))
  • Variables:
    • A
    • Varname
  • Facts:
    • mortal(socrates).
  • Rules:
    • alive(X) :- not_dead(X).
  • Conjunctions:
    • A, B.
  • Disjunctions:
    • A ; B.
  • True
  • Fail The modern Prolog language has added a number of new operations on top of these, but they all involve using the cut (!) operator, which is impure.

    Purity aims to implement ways to do the same things as Prolog programs that use a cut operator, but by only using the basic Horn clause opererations.

Contents of pack "purity"

Pack contains 11 files holding a total of 50.6K bytes.