Prolog Cookbook

  1. Documenting, testing, and moduling
  2. Classical Logic
    1. Negation
      1. Not
      2. Difference
      3. Fill Values
      4. De Morgan's Law
    2. Conjunction
      1. And
      2. Intersection
      3. Inner Join
      4. Product
      5. Series
    3. Disjunction
      1. Or
      2. Union
      3. Outer Join
      4. Sum
      5. Parallel
    4. Implication
      1. Proofs
    5. Equivalence
  3. Automata
  4. Graph Traversal
    1. Depth First
    2. Breadth First
    3. Transitive Closures
  5. Route Finding
  6. Puzzle Solving


By Robert Laing

These are notes I’ve made for myself and anyone else interested as I explore logic programming with Prolog, specifically SWI Prolog.

I originally created this website using MoinMoin, but have now moved it to Hugo thanks to its fantastic syntax highlighting which includes support for Prolog and just about every other programing language and data format.

I’m finding a static site generator as opposed to the various content management systems I’ve dabbled with over the years a pleasure since it doesn’t get in the way of using third party JavaScript libraries. So far, I’ve used vis.js to draw graphs I originally did with graphviz.

I’ve also played with MathJax to try fool people with intimidating maths into thinking I know what I’m talking about.

I’m in the process of rewriting the various puzzles etc that were here in MoinMoin to the new format. As we say in South Africa, it will be here again “now now”.

If you have any suggestions or corrections, please post them to a thread I started on SWI Prolog’s discourse forum.