Prolog is a logic programming language. It is a general purpose language often associated with artificial intelligence and computational linguistics. It has a purely logical subset, called “pure Prolog”, as well as a number of extralogical features.I started to study Prolog in the University and I’m looking in the web for some resources. I found a lot! This are some of the links:
- SWI Prolog (Compiler - Interpreter)
this code define a graph with a,b,c,d,e as nodes and [(a,b),(b,c),(b,d),(c,e)] as links.
% Declare a Graphnode(a).
link(c,e).exist_path(X,Y) :- link(X,Y).
exist_path(X,Y) :- link(X,Z),exist_path(Z,Y).
exist_path is predicate, an define if exist a path from node X to node Y, if exist the result is TRUE, if not FAIL (FALSE).This simple code leave me amazed!