网站首页  英汉词典

请输入您要查询的英文单词:

 

单词 Green cut
释义

Green cut

中文百科

Cut (逻辑编程) Cut (logic programming)

(重定向自Green cut)

Prolog编程中的cut操作,用!表示,该操作总能够成功,但是不能够回溯位于该操作左边的子句。Cut操作被广泛的用于减掉不希望回溯的分支,例如,避免找到进程不需要的额外的答案和避免额外的计算。

应当保守的应用cut操作,当进程不正确会有一种诱惑来插入cut来检验cut能否让进程正确。如果一个测试是不必须的因为有cut来保证这是真的,那幺最好在合适的地方加上注释说明这一点。

Cut被某些人认为是有争议的逻辑进程控制方式,因为该操作是因为效率问题被加入的而且不是一个Horn clause.

英语百科

Cut (logic programming) Cut (逻辑编程)

(重定向自Green cut)

The cut, in Prolog, is a goal, written as !, which always succeeds, but cannot be backtracked past. It is best used to prevent unwanted backtracking, for example, to prevent extra solutions being found by Prolog and to avoid additional computations that are not desired or required in a program.

随便看

 

英汉网英语在线翻译词典收录了3779314条英语词汇在线翻译词条,基本涵盖了全部常用英语词汇的中英文双语翻译及用法,是英语学习的有利工具。

 

Copyright © 2004-2024 encnc.com All Rights Reserved
更新时间:2025/6/21 2:21:33