Prolog

This is the most wide spread language for programming in logic. It is very popular in some sectors of the AI community as it provides very powerful mechanisms for symbolic processing. I've found its most important feature to be term unification, with backtracking search a very close second.

Examples

Please note that these examples are not intended to teach Prolog from scratch. To follow some of these programs, you'll need to be fairly familiar with the operation of Prolog.

Logic Puzzle

You would hope that, being a logic programming language, Prolog would be good for solving logic puzzles. And indeed it is. This particular example shows how a generate and test design pattern can be applied and refined to create an efficient solution to a constraint satisfaction problem.

Details here DNF Minimizer

DNF Minimizer

This example is part of a larger, multi-language application for analysing and simplifying logical expressions. The Prolog component is embeded within a C# program and does the heavy lifting for transforming disjunctive normal forms into their simplest expression.

Details here DNF Minimizer