PrologProlog was created around 1972 off the back of the resolution principle. It was accepted as being based off Mathematical Logic due to the backward chaining from goal to subgoal that it employed (i.e. A goal can be proven if all of it's subgoals can be proven). Unlike a procedural language, a programmer supplies Prolog with a database of clauses, which can then be queried by the user, or by other programs.
A Prolog program is made up of three different things:
These three things are all that is required to produce a Prolog program, however there is extra syntax for various other concepts. Two of these concepts are not identical in Prolog to Mathematical Logic, namely Negation and Disjunction. Negation is often implemented using a technique called Negation as Failure which tries proving the formula being negated and upon reaching finite failure, treats the negated formula as true. |
|||||||
previous page | next page |