The idea of using mathematical logic as a programming language was proposed by Robert Kowalski in England in the early 70s of the twentieth century. Logic programming emerged mainly due to advances in automatic theorem proving.
The main purpose of mathematical logic is to provide a system of formal notation for display purposes. One part of mathematical logic is a logic expression. Logic - a part of mathematical logic that studies the statements that are considered by their logical values - truth and falsity - and logical operations on them. The basic element of logic statements are statements and operations on them. In the logic expression is only affirmative sentences that may be true or false, not both; simultaneously. Each such statement is called affirmative sentence. In the logic expression is used five basic logical operations: negation, conjunction (logical multiplication), disjunction (logical addition), the conclusion (implication) equivalence.
Logic programming - a record task language of mathematical logic as a set of statements, relations between the statements and rules of inference of some other expression. As a result of the problem, written in terms of logic programming, checked for fairness worded statements. Logic programming is far different from algorithmic programming languages. The compiled program does not describe the procedure for solving and logical domain model that includes some facts concerning the properties of the domain and relations between objects in this area, as well as rules of inference of new properties and relationships with the already defined.
The basic idea of logic programming were first successfully implemented in the form of programming language Prolog. Language Prolog program consists of the set of statements, each of which is either a fact or rule and a statement of purpose. The rule specifies how the solution associated with the given facts, or as much as possible from the set of facts to bring this solution. Programming language Prolog includes the following stages:
- announcement of facts about objects and relations between them;
- define rules of interaction of objects and relations between them;
- formulating questions about objects and relations between them.
No comments:
Post a Comment