

While predicates with multiple arguments express the relations between them. Unary predicates express properties of their arguments, (true is a built-in predicate,Īnother important part of Prolog are predicates.

Pure Prolog programs describe relations between processed entities using Horn clauses.Ĭlause is a rule of form Head :- Body., which reads as “to show/solve Head, show/solve Body”.īody consists of several calls to predicates (rule’s goals), combined with conjunction and disjunction.Ĭlauses with empty body are called facts and are equivalent to rules Head :- true. compound term is a functor atom, followed by several arguments, each of them being a term.variable is denoted with a name which starts with an uppercase letter and is used as a placeholder for any other term.numbers and strings are the same as in other languages.atom is a name without particular meaning, used for construction of compound terms.Prolog uses one data type called term, which comes in several types: The main paradigm implemented in Prolog is logic programming.Īs in most old languages, later implementations, like Visual Prolog, feature additional, more recent object-oriented and event-driven paradigms, some with elements of imperative style. Using different names to refer to different entities etc. Prolog was influenced by an earlier language Planner, borrowing from it the following concepts:īackward-chaining (i.e., pattern-directed procedures invocation from goals)

It is mostly used in natural language processing, artificial intelligence researches, expert systems, answering systems, ontologies and other object domains where use of logic paradigm is natural. Prolog is one of the oldest and remains one of the most popular logic languages today, though it is much less popular than major imperative languages. Prolog standard is given in ISO/IEC 13211-1, published in 1995. Since than it has spawned several dialects which extend it with different capabilities. Prolog was created in 1972 in an attempt to combine the use of logic with knowledge representation. Prolog (from “PROgramming in LOGic”) is a general-purpose programming language.
