请输入您要查询的字词:

 

单词 Prolog
释义
Prolog

Computer
  • A logic programming language, widely used in artificial intelligence. The basic element of Prolog programs is the structure, which expresses a simple relationship among individuals (constants or variables). Examples of structures are:

    • sister(mary, jane).

    • ancestor(adam, X).

    Words that start with a lower-case letter are constants and words that start with a capital letter are variables, so mary, jane, and adam are constants and X is a variable. Prolog programs consist of clauses, where each is either a simple assertion or an implication. The former consists of a single structure, while the latter takes the form:

    • ‘A if B1 and B2 and … and Bn’,

    where the conclusion A and the conditions Bn are all structures. An example of an implication is

    • grandfather(X, Y) :-
    • father(X, Z), parent(Z, Y).

    which means ‘X is a grandfather of Y if X is the father of Z and Z is a parent of Y’.

    A Prolog program is invoked by presenting a query in the form of a conjunction of structures, as in

    • friend(fred, X), father(john, X).

    Execution of the program then determines (if possible) a set of values for the variables in the query such that the truth of the query then follows from the assertions and implications in the program. The above example tries to find all the sons of john that are friends of fred.

    Prolog was used as the basis of the Japanese fifth generation project.


随便看

 

科学参考收录了60776条科技类词条,基本涵盖了常见科技类参考文献及英语词汇的翻译,是科学学习和研究的有利工具。

 

Copyright © 2000-2023 Sciref.net All Rights Reserved
京ICP备2021023879号 更新时间:2025/2/12 16:08:25