Prolog

Some terms

“,”: And.

“:-“: if, or is implied by.

“unify”: approximate “assign value” or “instantiate”.

Variable

Starts with uppercase or underscore. Usually, underscore is for internal usage, and 2 external variables can point to same internal variable (similar with a pointer).

Prolog can only assign the value once to a variable during one query. The exception is anonymous variable “_” which can have several values.

Structured data

.pl file is the text file which contains the facts. If pl file is associated to SWI Prolog, you can simply double click the file. Prolog will load them into the knowledge base. If not, use, File -> Consult… to load the file.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

Back to Top