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