Tutorial by Examples

When programming in Prolog, we must pick two kinds of names: names of predicates names of variables. A good predicate name makes clear what each argument means. By convention, underscores are used in names to separate the description of different arguments. This is because underscores_keep_ev...
There are only a few language constructs in Prolog, and several ways for indenting them are common. No matter which style is chosen, one principle that should always be adhered to is to never place (;)/2 at the end of a line. This is because ; and , look very similar, and , frequently occurs at the...
Ideally, Prolog predicates can be used in all directions. For many pure predicates, this is also actually the case. However, some predicates only work in particular modes, which means instantiation patterns of their arguments. By convention, the most common argument order for such predicates is: ...

Page 1 of 1