Prolog Phase Summary

Source: Internet
Author: User

http://blog.csdn.net/mwsong/article/details/1766382

So far, we have a basic understanding of Prolog, and it is necessary to make a systematic summary of what we have learned.

    • The Prolog program is a database of facts and rules.
    • The call between the rules is done through a federated operation, and the Prolog can automatically complete the pattern match.
    • Rules can also invoke internal predicates, such as WRITE/1.
    • We can query (invoke) the rules separately in the Prolog interpreter.


I have the following knowledge about the running flow of the Prolog program:

    • The operation of the rules is achieved through the prolog built-in backtracking function.
    • We can use internal predicate fail to enforce backtracking.
    • We can also force the predicate to succeed by adding an argument to a pseudo-variable (underscore) clause without the body part.


We also learned,

      • The facts in the database replace the data structures in the general language.
      • Backtracking is the ability to perform circular operations in a general language.
      • And the pattern matching can complete the judgment operation in the general language.
      • Rules can be debugged individually, and they correspond to modules in the general language.
      • Calls between rules are similar to those for functions in the general language.

Prolog Phase Summary

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.