Prolog

From TCS Wiki
Jump to navigation Jump to search

Prolog is a programming language that uses first order logic.It is the most widespread logic programming language. It is declarative. Alain Cormerauer, a French computer scientist developed Prolog in the early 1970s. Prolog is rather different from other programming languages. It uses facts and rules. Given the facts, the rules can be used to derive new facts.

Note that Prolog uses a paradigm called Negation as failure, which means that [math]\displaystyle{ \mathrm{not}~p }[/math] is assumed if [math]\displaystyle{ p }[/math] cannot be derived. This is different from true logical negation. While negation is failure has its benefits, it often confuses people starting to learn Prolog, as they expect true logical negation.

Prolog also uses Horn clauses. It is a turing-complete programming language.

Template:Tech-stub