Seven weeks and seven languages (4)

Source: Internet
Author: User

Recently, I have been learning about the extremely interesting logic of PROLOG.Programming LanguageIt is completely different from the imperative programming language. Prolog is declarative. I personally think it is more like a DSL language and logic DSL language.

No PROLOG LanguageCodeThere are actually three points.

Fact: some logical concepts are defined. They are true without any proof, just like the kilometers in the Euclidean ry.

Rule: Defines rules between basic facts. It is a bit like the reasoning process of Euclidean ry. Some Theorems can be derived from the basic kilometer.

Goal: this is the problem. The solution to the problem is derived from facts and defined rules, which is a bit like a mathematical proof.

The core of this language is recursion. It is completely solved by recursion.

Recursion has two important elements: boundary condition and recursive definition.

That is to say, it cannot be infinitely recursive. If recursion is not completed within a unit of time, the problem is unbounded.

Recursive definition is actuallyAlgorithmProblem.

Prolog is suitable for programming logic and rules. It can solve the problem related to artificial intelligence. It is easy to learn a little and mainly exercises abstract thinking.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.